aboutsummaryrefslogtreecommitdiff
path: root/xorg-server/dix/devices.c
diff options
context:
space:
mode:
Diffstat (limited to 'xorg-server/dix/devices.c')
-rw-r--r--xorg-server/dix/devices.c3
1 files changed, 3 insertions, 0 deletions
diff --git a/xorg-server/dix/devices.c b/xorg-server/dix/devices.c
index 37cbcdb78..e448eab62 100644
--- a/xorg-server/dix/devices.c
+++ b/xorg-server/dix/devices.c
@@ -73,6 +73,7 @@ SOFTWARE.
#include "dixevents.h"
#include "mipointer.h"
#include "eventstr.h"
+#include "dixgrabs.h"
#include <X11/extensions/XI.h>
#include <X11/extensions/XI2.h>
@@ -273,6 +274,7 @@ AddInputDevice(ClientPtr client, DeviceProc deviceProc, Bool autoStart)
dev->deviceGrab.grabTime = currentTime;
dev->deviceGrab.ActivateGrab = ActivateKeyboardGrab;
dev->deviceGrab.DeactivateGrab = DeactivateKeyboardGrab;
+ dev->deviceGrab.activeGrab = AllocGrab();
XkbSetExtension(dev, ProcessKeyboardEvent);
@@ -941,6 +943,7 @@ CloseDevice(DeviceIntPtr dev)
}
}
+ FreeGrab(dev->deviceGrab.activeGrab);
free(dev->deviceGrab.sync.event);
free(dev->config_info); /* Allocated in xf86ActivateDevice. */
free(dev->last.scroll);