Rémi Bernon (@rbernon) commented about dlls/winex11.drv/keyboard.c:
static int NumLockMask, ScrollLockMask, AltGrMask; /* mask in the XKeyEvent state */
static pthread_mutex_t kbd_mutex = PTHREAD_MUTEX_INITIALIZER; +static struct list xkb_layouts = LIST_INIT( xkb_layouts );
static char KEYBOARD_MapDeadKeysym(KeySym keysym);
+#ifdef SONAME_LIBXKBREGISTRY +static void create_layout_from_xkb( int xkb_group, const char *xkb_layout ) Here as well, lets not make this conditionally compiled unless it actually does libxkbregistry calls. Especially as I understand you are planning on doing that with the old detection code too which means you would then have to move or remove conditionally compiled code again.
-- https://gitlab.winehq.org/wine/wine/-/merge_requests/10779#note_138309