summaryrefslogtreecommitdiff
path: root/Xi
diff options
context:
space:
mode:
authorPeter Hutterer <peter@cs.unisa.edu.au>2007-03-07 18:19:20 +1030
committerPeter Hutterer <peter@cs.unisa.edu.au>2007-03-07 18:19:20 +1030
commit537bc2ead4d154552cbdc3a19e335f82af63792c (patch)
tree444dcf6acb5e72c45b352fef9b6c17d794f66f1e /Xi
parent39aa79177196e21bcdbaf8e44adead9ef91e6ee5 (diff)
Xi: Don't deactivate core grabs from non-core button/key releases.
dix: set coreGrab flag for grabs caused by GrabPointer and button presses. remove virtual core devices from device list, only real devices are in the list now. Auto-pair each keyboard with a real pointer if one is available, provides multiple keyboards automatically after startup if devices are configured. fix GuessFreePointerDevice() to do what it's supposed to do. mi: fix: call miPointerMove from miPointerWarpCursor. fix: remove unused id field from miCursorInfoRec don't update sprite for virtual core pointer.
Diffstat (limited to 'Xi')
-rw-r--r--Xi/exevents.c18
1 files changed, 11 insertions, 7 deletions
diff --git a/Xi/exevents.c b/Xi/exevents.c
index 7e80926e4..5dbb0e226 100644
--- a/Xi/exevents.c
+++ b/Xi/exevents.c
@@ -104,12 +104,12 @@ RegisterOtherDevice(DeviceIntPtr device)
}
/*ARGSUSED*/ void
-ProcessOtherEvent(xEventPtr xE, register DeviceIntPtr other, int count)
+ProcessOtherEvent(xEventPtr xE, DeviceIntPtr other, int count)
{
- register BYTE *kptr;
- register int i;
- register CARD16 modifiers;
- register CARD16 mask;
+ BYTE *kptr;
+ int i;
+ CARD16 modifiers;
+ CARD16 mask;
GrabPtr grab = other->grab;
Bool deactivateDeviceGrab = FALSE;
int key = 0, bit = 0, rootX, rootY;
@@ -229,7 +229,9 @@ ProcessOtherEvent(xEventPtr xE, register DeviceIntPtr other, int count)
}
}
- if (other->fromPassiveGrab && (key == other->activatingKey))
+ if (other->fromPassiveGrab &&
+ !other->grab->coreGrab &&
+ (key == other->activatingKey))
deactivateDeviceGrab = TRUE;
} else if (xE->u.u.type == DeviceButtonPress) {
if (!b)
@@ -267,7 +269,9 @@ ProcessOtherEvent(xEventPtr xE, register DeviceIntPtr other, int count)
if (xE->u.u.detail <= 5)
b->state &= ~((Button1Mask >> 1) << xE->u.u.detail);
SetMaskForEvent(Motion_Filter(b), DeviceMotionNotify);
- if (!b->state && other->fromPassiveGrab)
+ if (!b->state
+ && other->fromPassiveGrab
+ && !other->grab->coreGrab)
deactivateDeviceGrab = TRUE;
} else if (xE->u.u.type == ProximityIn)
other->valuator->mode &= ~OutOfProximity;