summaryrefslogtreecommitdiff
path: root/dix/events.c
diff options
context:
space:
mode:
authorEgbert Eich <eich@suse.de>2004-01-29 08:08:57 +0000
committerEgbert Eich <eich@suse.de>2004-01-29 08:08:57 +0000
commit3c64b65d805915e5c5628663113c54c3e9c3013b (patch)
treedff84b1be15ae6a4658af2168ca50278bf044b5a /dix/events.c
parent2ec70aa70133190ad31a83114fdb9a218e6aa8e6 (diff)
Importing vendor version xf86-012804-2330 on Thu Jan 29 00:06:33 PST 2004xf86-012804-2330
Diffstat (limited to 'dix/events.c')
-rw-r--r--dix/events.c28
1 files changed, 16 insertions, 12 deletions
diff --git a/dix/events.c b/dix/events.c
index 2131b5fd4..2853e1013 100644
--- a/dix/events.c
+++ b/dix/events.c
@@ -1,4 +1,4 @@
-/* $XFree86: xc/programs/Xserver/dix/events.c,v 3.50 2003/11/17 22:20:34 dawes Exp $ */
+/* $XFree86: xc/programs/Xserver/dix/events.c,v 3.52 2004/01/23 07:23:34 herrb Exp $ */
/************************************************************
Copyright 1987, 1998 The Open Group
@@ -944,7 +944,8 @@ EnqueueEvent(xE, device, count)
#ifdef XKB
/* Fix for key repeating bug. */
- if (xE->u.u.type == KeyRelease)
+ if (device->key != NULL && device->key->xkbInfo != NULL &&
+ xE->u.u.type == KeyRelease)
AccessXCancelRepeatKey(device->key->xkbInfo, xE->u.u.detail);
#endif
@@ -1647,8 +1648,11 @@ DeliverEventsToWindow(pWin, pEvents, count, filter, grab, mskidx)
#ifdef XINPUT
else
{
- if (((type == DeviceMotionNotify) || (type == DeviceButtonPress)) &&
- deliveries)
+ if (((type == DeviceMotionNotify)
+#ifdef XKB
+ || (type == DeviceButtonPress)
+#endif
+ ) && deliveries)
CheckDeviceGrabAndHintWindow (pWin, type,
(deviceKeyButtonPointer*) pEvents,
grab, client, deliveryMask);
@@ -2367,10 +2371,10 @@ CheckPassiveGrabsOnWindow(
xkbi= gdev->key->xkbInfo;
#endif
tempGrab.modifierDevice = grab->modifierDevice;
- if (device == grab->modifierDevice &&
- (xE->u.u.type == KeyPress
-#ifdef XINPUT
- || xE->u.u.type == DeviceKeyPress
+ if ((device == grab->modifierDevice) &&
+ ((xE->u.u.type == KeyPress)
+#if defined(XINPUT) && defined(XKB)
+ || (xE->u.u.type == DeviceKeyPress)
#endif
))
tempGrab.modifiersDetail.exact =
@@ -2455,11 +2459,11 @@ CheckDeviceGrabs(device, xE, checkFirst, count)
register WindowPtr pWin = NULL;
register FocusClassPtr focus = device->focus;
- if ((xE->u.u.type == ButtonPress
-#ifdef XINPUT
- || xE->u.u.type == DeviceButtonPress
+ if (((xE->u.u.type == ButtonPress)
+#if defined(XINPUT) && defined(XKB)
+ || (xE->u.u.type == DeviceButtonPress)
#endif
- ) && device->button->buttonsDown != 1)
+ ) && (device->button->buttonsDown != 1))
return FALSE;
i = checkFirst;