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>
This commit is contained in:
@@ -224,6 +224,8 @@ AddInputDevice(ClientPtr client, DeviceProc deviceProc, Bool autoStart)
|
|||||||
|
|
||||||
/* device grab defaults */
|
/* device grab defaults */
|
||||||
dev->deviceGrab.grabTime = currentTime;
|
dev->deviceGrab.grabTime = currentTime;
|
||||||
|
dev->deviceGrab.ActivateGrab = ActivateKeyboardGrab;
|
||||||
|
dev->deviceGrab.DeactivateGrab = DeactivateKeyboardGrab;
|
||||||
|
|
||||||
dev->coreEvents = TRUE;
|
dev->coreEvents = TRUE;
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user