diff options
author | Peter Hutterer <peter.hutterer@who-t.net> | 2009-05-11 12:51:40 +1000 |
---|---|---|
committer | Peter Hutterer <peter.hutterer@who-t.net> | 2009-05-16 12:20:58 +1000 |
commit | fdce58ca822f4e43e03e84076190f52d7104e01f (patch) | |
tree | 3a1bf403e39d59a016321b0f23006ab4ed244e79 | |
parent | e3f296d91dfe6b827195e1d387e1a04aa73b85c3 (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.c | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/dix/devices.c b/dix/devices.c index 83285b4d1..dc5de0526 100644 --- a/dix/devices.c +++ b/dix/devices.c @@ -226,6 +226,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; |