X11: use xkb x11 to get xkb_state - #10
Conversation
|
Is this patch included upstream already? If not, perhaps you could open a new PR targeting this branch on winit rust-windowing#2789 |
|
Seems like the PR you linked already uses winit/src/platform_impl/linux/common/xkb_state.rs Lines 382 to 386 in b165571 Is there any effort to sync neovide with upstream winit? |
|
Yes, we will merge this soon neovide/neovide#1789, which I think already includes the changes you need. After that I think I will create a special branch that tracks the upstream Keyboard V2 winit branch instead of our fork. The changes there are meant to be included in the next winit release, probably in the end of the summer, so it would be good if we have people testing against that, to make sure it works once the release is out. |
This uses
XKBXH.xkb_x11_state_new_from_deviceto get the keyboard state. This solves a problem on X11 where I would have multiple layouts (sayus,fr) but the second one (fr) would be selected in Gnome. The previous way to get the keyboard state (xkb_state_new) would returnusinstead.cargo fmthas been run on this branchcargo docbuilds successfullyCHANGELOG.mdif knowledge of this change could be valuable to users