aboutsummaryrefslogtreecommitdiff
path: root/nx-X11
diff options
context:
space:
mode:
Diffstat (limited to 'nx-X11')
-rw-r--r--nx-X11/programs/Xserver/dix/devices.c13
1 files changed, 8 insertions, 5 deletions
diff --git a/nx-X11/programs/Xserver/dix/devices.c b/nx-X11/programs/Xserver/dix/devices.c
index 51cf3fef9..8ad1cc371 100644
--- a/nx-X11/programs/Xserver/dix/devices.c
+++ b/nx-X11/programs/Xserver/dix/devices.c
@@ -203,7 +203,15 @@ CloseDevice(register DeviceIntPtr dev)
if (dev->inited)
(void)(*dev->deviceProc)(dev, DEVICE_CLOSE);
+
+#ifdef XKB
+ while (dev->xkb_interest) {
+ XkbRemoveResourceClient((DevicePtr)dev,dev->xkb_interest->resource);
+ }
+#endif
+
free(dev->name);
+
if (dev->key)
{
#ifdef XKB
@@ -267,11 +275,6 @@ CloseDevice(register DeviceIntPtr dev)
#endif
free(l);
}
-#ifdef XKB
- while (dev->xkb_interest) {
- XkbRemoveResourceClient((DevicePtr)dev,dev->xkb_interest->resource);
- }
-#endif
free(dev->sync.event);
free(dev);
}