summaryrefslogtreecommitdiff
path: root/xkb
diff options
context:
space:
mode:
authorPeter Hutterer <peter.hutterer@who-t.net>2016-06-28 11:42:41 +1000
committerPeter Hutterer <peter.hutterer@who-t.net>2016-06-29 19:20:17 +1000
commitd135100d6b17e54262a12aeaebe0fe2fe48da3bb (patch)
treed04d5cb4c6cb3344ab56fbd4bf32f026a391c22d /xkb
parentb83dede9cb930cf55249ad8e935f3c4d4328e2d9 (diff)
xkb: add a cause to the xkb indicator update after a keymap change
Regression introduce by ac164e58870d 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. https://bugs.freedesktop.org/show_bug.cgi?id=96384 Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net> Reviewed-by: Julien Cristau <jcristau@debian.org> Reviewed-by: Daniel Stone <daniels@collabora.com>
Diffstat (limited to 'xkb')
-rw-r--r--xkb/xkb.c4
1 files changed, 3 insertions, 1 deletions
diff --git a/xkb/xkb.c b/xkb/xkb.c
index 3a6ad651e..678f82368 100644
--- a/xkb/xkb.c
+++ b/xkb/xkb.c
@@ -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;
}