diff options
Diffstat (limited to 'dix/events.c')
-rw-r--r-- | dix/events.c | 28 |
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; |