-
Notifications
You must be signed in to change notification settings - Fork 57
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
Fix segfault if key event precedes kbd setup #124
base: master
Are you sure you want to change the base?
Conversation
TBH this sounds like a compositor bug. Can you post a The commit message has a typo: this is about the modifiers event, not the key event. We still segfault if we get a key event before a keymap event. If we want to merge this, maybe we should ignore key events before keymap. |
Here's the WAYLAND_DEBUG=1 output:
|
So it looks like we are getting a modifiers even (and an enter event) before we get a keymap event. That might be a bug in the compositor (this is sway 1.8.1). Although, from wayland.xml it doesn't sound like there is actually a requirement that th e keymap is sent before any modifier or key events. Although, it seems odd to send events in that order, since the application would either have to log the modifiers to be processed later, ignore the event, or assume a keymap before getting the keymap event. Interestingly, on this branch this is the output I get with WAYLAND_DEBUG=1 (just the interesting bit):
Notice that we do eventually get the keymap event before the actual key event, but keyboard focus enters one surface, leaves that surface, and enters another surface, before we get the keymap event, and each time it enters a surface, we get a modifiers event as well. |
Make sure the keyboard has been initialized before using it in the key press handler.
this still happens on sway master (interestingly only if i am running fcitx5; otherwise it does not happen). this mr fixes it. for posterity my WAYLAND_DEBUG=1 of slurp: log
|
Fixes: #123