On Mon Jun 15 14:00:11 2026 +0000, Rémi Bernon wrote:
IMO it would be better to fix it in the compositor (and update the protocol spec if necessary). Other calls such as set_current_xkb_group might have side effects that expect keyboard layouts, and therefore keymap, to have been initialized. Otherwise we just hide the bug in Wine and it might never be properly fixed. `xkb_state_new` may fail, though such cases are extremely rare in practice. From a defensive programming perspective, it is still necessary to verify that `keyboard->xkb_state != NULL` before calling `xkb_state_update_mask`. Additionally, the WINE project runs on a wide variety of Wayland compositors. Adding this defensive check is also beneficial for compatibility.
-- https://gitlab.winehq.org/wine/wine/-/merge_requests/11151#note_143216