client-toolkit
client-toolkit copied to clipboard
Add `update_keymap` method that's called when server provides keymap
This is meant to provide a way to address https://github.com/pop-os/xdg-shell-wrapper/issues/8, in combination with https://github.com/Smithay/smithay/pull/750.
This is currently potentially unsound due to the
unsafe impl Send for KeyboardData {}. xdg::Keymap uses non-thread-safe ref-counting, but sctk assumes it is only used from one thread. This is difficult to address.
The API isn't great here, but I don't know if anything better is really possible. Otherwise this should work fine. (While I think https://github.com/Smithay/smithay/pull/750 isn't quite right.)
I don't see anything else that would need to be done, @ids1024 are you fine with this being merged or do you have some new idea to handle this.
Merging it seems good to me, given it's useful to support and I can't really think of a better way to do so.