Fix bug on get_keyboard without surface#1067
Conversation
Send keymap even when there isn't a focused surface
|
wl-clipboard uses the data-control protocols which are privileged in jay. From the absence of ext_data_control messages in the wayland debug log I assume wl-clipboard does not have access to these protocols. You can give wl-copy / wl-paste the required capabilities in your config with or by running them with |
Yup, this fixes it. Thank you. Should I close the PR? |
| } | ||
|
|
||
| pub fn send_initial_keymap(self: &Rc<Self>, state: &KeyboardState) { | ||
| self.send_keymap(state); |
There was a problem hiding this comment.
| self.send_keymap(state); | |
| self.kb_state_id.set(kb_state.id); | |
| self.send_keymap(state); |
|
It might make sense to do this. Some debugging clients might want to get the keymap without creating a window. |
Hello,
I was testing Jay for the first time and noticed that my terminal would hang when I tried to yank to clipboard in
helixeditor.Launching
wl-copyandwl-pastewith wayland debug, I noticed the following:WAYLAND_DEBUG=1 wl-copyoutput (truncated)and then the process hangs.
Same with:
WAYLAND_DEBUG=1 wl-pasteoutput (truncated)I have played a bit with compositor development in the past, and I remember I had to specifically handle
wl-copyandwl-paste- they spawn a 1x1 surface. Right now, jay is actually tiling this surface and, after this fix, I see it being spawned for a split second when I launchwl-copyorwl-pastein a terminal. You might want to fix that in a separate PR.I would also recommend taking a look at
wlroots. They always send the keymap, as you can check there.I am not too comfortable with jay or even
wlroots. Feel free to propose some other solution to this specific problem if you are not happy with the fix, I'd be glad to help.Cheers