summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorPeter Hutterer <peter.hutterer@who-t.net>2009-05-11 12:51:40 +1000
committerPeter Hutterer <peter.hutterer@who-t.net>2009-05-16 12:01:22 +1000
commit6f9e22049862ee9ac7f604411d005d8bb1b2dd1c (patch)
treeea469a88cb84dd4eb1acb0ab5cb4e0a0dcca7946
parentc1d7deca9281ba1df0df1abcea1fe7f841b10ff9 (diff)
dix: ensure Activate/DeactivateGrab has a valid value.
Xephyr doesn't manually set Activate/DeactivateGrab for new devices, resulting in a NULL-pointer dereference later when a grab is activated. Avoid the segfault by ensuring that the pointer is always valid. Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
-rw-r--r--dix/devices.c2
1 files changed, 2 insertions, 0 deletions
diff --git a/dix/devices.c b/dix/devices.c
index afe340b2f..6f464e7ca 100644
--- a/dix/devices.c
+++ b/dix/devices.c
@@ -224,6 +224,8 @@ AddInputDevice(ClientPtr client, DeviceProc deviceProc, Bool autoStart)
/* device grab defaults */
dev->deviceGrab.grabTime = currentTime;
+ dev->deviceGrab.ActivateGrab = ActivateKeyboardGrab;
+ dev->deviceGrab.DeactivateGrab = DeactivateKeyboardGrab;
dev->coreEvents = TRUE;