On Tue Apr 7 08:32:03 2026 +0000, Rémi Bernon wrote:
Same thing here, and looking at the whole branch it seems to be gone at some point, so this doesn't look very useful. In general I believe the current xkb group is just part of the key event state, and doesn't really need to be tracked separately? We could get the Xkb group from the `KeyEvent`, in a slightly obscure way (i.e. probably something like `(state >> 0x2000) & 0x3`). Potential downsides: I'm not 100% sure how safe that is (probably pretty safe) and waiting for a KeyEvent can mean delaying updating the internal state until the next keypress.
In the branch I've been using the `XkbStateNotify` event to detect the X11 layout switch: https://gitlab.winehq.org/Mystral/wine/-/commit/59279a0a668cf5d27bca923db3b1.... Eventually that directly triggers a win32 layout switch as well, without needing to store the current group id in global state. I'll check if that works well enough via the plain old `MappingNotify` event. -- https://gitlab.winehq.org/wine/wine/-/merge_requests/10550#note_135323