-
Notifications
You must be signed in to change notification settings - Fork 170
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
input: Only forward modifiers in KeyboardInnerHandle::set_focus #1110
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks good! Thanks
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM
How does this compare to behavior in other compositors? |
Hmm sway does seem to indeed send the pressed keys: https://github.com/swaywm/sway/blob/89f85312687b7fd1777c936e169e6400cee0a4b4/sway/input/seat.c#L164-L166 |
So I was wondering why I don't observe this behaviour in cosmic-comp and it seems to come do to, at which point you trigger the shortcut. cosmic-comp triggers them on key-release, which means the key is removed from |
@ids1024 @Drakulix I observed that XFCE (X11) will maintain pressed keys when switching windows. So I've implemented the second option and it appears to work well. |
Codecov ReportPatch coverage:
Additional details and impacted files@@ Coverage Diff @@
## master #1110 +/- ##
==========================================
- Coverage 24.01% 22.90% -1.11%
==========================================
Files 140 143 +3
Lines 21591 22859 +1268
==========================================
+ Hits 5184 5235 +51
- Misses 16407 17624 +1217
Flags with carried forward coverage won't be shown. Click here to find out more.
☔ View full report in Codecov by Sentry. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Now this is only a bugfix, not forwarding any intercepted key presses. I don't think this is in any way controversial.
Should anyone want to discuss over semantics of key presses on focus swaps, they can open a new issue. This doesn't change behaviour, so lets move on with this PR.
Thanks @luveti for working on this! :)
This should fix #1107.