From 88043a194475cafa788fc87c8999727bbfa0c219 Mon Sep 17 00:00:00 2001 From: Jeremy Huddleston Sequoia Date: Mon, 17 Aug 2026 01:15:52 -0700 Subject: [PATCH] xkb: Default to one group whenever a keymap reports none XkbInitControls() had a fallback to ensure keymaps that defined no symbols at all still resulted in one group. Extend this to cover the case where a keymap reports symbols but no groups. Fixes: https://github.com/XQuartz/XQuartz/issues/422 Signed-off-by: Jeremy Huddleston Sequoia Part-of: (cherry picked from commit 8e11715024a5167c9554be7b49c4d6ca0bd2c73b) (cherry picked from commit c9dd5aa9e505d65036c351c78cd74c5a6fc53535) (cherry picked from commit 712c3e7497c90a0d9ad6f863abdd2e330623887d) --- Xext/xkeyboard/xkbInit.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Xext/xkeyboard/xkbInit.c b/Xext/xkeyboard/xkbInit.c index e9b7c8f3bc..bba57beb54 100644 --- a/Xext/xkeyboard/xkbInit.c +++ b/Xext/xkeyboard/xkbInit.c @@ -479,7 +479,7 @@ XkbInitControls(DeviceIntPtr pXDev, XkbSrvInfoPtr xkbi) if (XkbAllocControls(xkb, XkbAllControlsMask) != Success) FatalError("Couldn't allocate keyboard controls\n"); ctrls = xkb->ctrls; - if (!(xkb->defined & XkmSymbolsMask)) + if (!(xkb->defined & XkmSymbolsMask) || ctrls->num_groups == 0) ctrls->num_groups = 1; ctrls->groups_wrap = XkbSetGroupInfo(1, XkbWrapIntoRange, 0); ctrls->internal.mask = 0;