Open Vliro opened 1 month ago
Our xdg-shell is definitely very primitive. It would not surprise me that we are missing something there.
I don't have much experience with Wayland, but I did notice that seat_client_send_keymap does not get called when running the game under Wayland, but gets ran when running X11, which seems to be the function responsible for forwarding the keyboard. The game does start without a proper window, and crashes before it creates one, if that is relevant.
Testing out firefox in gamescope I get [132834, Main Thread] WARNING: gdk_seat_get_keyboard: assertion 'GDK_IS_SEAT (seat)' failed: 'glib warning', file /usr/src/debug/firefox/firefox-128.0.3/toolkit/xre/nsSigHandlers.cpp:187
(firefox:132834): Gdk-CRITICAL **: 20:29:41.209: gdk_seat_get_keyboard: assertion 'GDK_IS_SEAT (seat)' failed
I've tested running native wayland on minecraft within gamescope, and it leads to a crash.
C [libxkbcommon.so.0+0x1d604] xkb_state_key_get_layout+0x4
The offender seems to be that the Wayland keyboard remap event does not get fired, which in glfw instantiates the xkb state struct, and since it is not instantiated it causes a segfault. I've been testing out different XKB environment variables and get no error, yet the keyboard remap event is not properly called.
Under X11 it works fine.