Repository navigation
Activation tokens with old serials still steal focus after #16427 #16608
Unanswered
dmkenney
asked this question in
Feature requests - Protocols / Integrations
Replies: 0 comments
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
What's the problem?
#16427 Fixes most of the focus stealing, but an app keeps every serial Hyprland scrent it, even after you switch away, and browsers (and probably apps) use that. So when a script or an AI agent opens a link, the browser makes its own token with the last serial that was used, and Hyprland accepts it. What this does is causes the browser to focus when it shouldn't - because there's no serial attached. Tested it in Chromium, Chrome, Brave, and Firefox.
What's your proposed solution?
To remember the serial of the last keyboard leave Hyprland sent each app and if it's older than the last one used, reject it. Input that the app got while it still had focus still counts. As do tokens another app makes from a fresh click and passes on.
I wrote it on a fork on top of main: https://github.com/dmkenney/Hyprland/tree/activation-reject-stale-serials
Attachments
Tested in a nested Hyprland with focus_on_activate on:
I acknowledge that:
I have searched all (open and closed) discussions and issues, checked the wiki, and my feature is not there.
I have read the Code of Conduct and agree to follow it.
I wrote this request with my own hands, my own keyboard, and in my own words.
All reactions