Commit d135100d authored by Peter Hutterer's avatar Peter Hutterer

xkb: add a cause to the xkb indicator update after a keymap change

Regression introduce by ac164e58 which calls
XkbUpdateAllDeviceIndicators() with two NULL arguments. A few layers down into
the stack and we triggered a NULL-pointer dereference. In theory a NULL cause
is acceptable since we don't actually change modifier state here. Instead of
updating all places to check for NULL just set the cause to the client
request and go to the pub. Peter Hutterer's avatarPeter Hutterer <>
Reviewed-by: Julien Cristau's avatarJulien Cristau <>
Reviewed-by: Daniel Stone's avatarDaniel Stone <>
parent b83dede9
......@@ -5706,6 +5706,7 @@ ProcXkbGetKbdByName(ClientPtr client)
xkbGetGeometryReply grep = { 0 };
XkbComponentNamesRec names = { 0 };
XkbDescPtr xkb, new;
XkbEventCauseRec cause;
unsigned char *str;
char mapFile[PATH_MAX];
unsigned len;
......@@ -6016,7 +6017,8 @@ ProcXkbGetKbdByName(ClientPtr client)
new = NULL;
XkbFreeComponentNames(&names, FALSE);
XkbUpdateAllDeviceIndicators(NULL, NULL);
XkbSetCauseXkbReq(&cause, X_kbGetKbdByName, client);
XkbUpdateAllDeviceIndicators(NULL, &cause);
return Success;
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment