diff options
author | Peter Hutterer <peter.hutterer@who-t.net> | 2009-05-11 12:51:40 +1000 |
---|---|---|
committer | Keith Packard <keithp@keithp.com> | 2009-06-29 14:16:59 -0700 |
commit | c91accd173b5f17af771bd9f4e60b5860af15718 (patch) | |
tree | 1849bcd5ec8a4d655aa9f82c42184402f039aeac /dix | |
parent | bd94c7c986aed4496cd4e8141bb30c3e4412f1f4 (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>
(cherry picked from commit 6f9e22049862ee9ac7f604411d005d8bb1b2dd1c)
Signed-off-by: Keith Packard <keithp@keithp.com>
Diffstat (limited to 'dix')
-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 0858f20cf..3b8d544da 100644 --- a/dix/devices.c +++ b/dix/devices.c @@ -216,6 +216,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; |