dix: Use GenericEvent instead of LASTEvent to check for core events.

Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
This commit is contained in:
Peter Hutterer 2009-01-15 11:03:03 +10:00
parent 9f3c5d46f8
commit 412e09e1e3

View File

@ -3256,7 +3256,7 @@ CheckPassiveGrabsOnWindow(
tempGrab.modifierDevice = grab->modifierDevice;
tempGrab.modifiersDetail.exact = xkbi ? xkbi->state.grab_mods : 0;
/* ignore the device for core events when comparing grabs */
if (GrabMatchesSecond(&tempGrab, grab, (xE->u.u.type < LASTEvent)) &&
if (GrabMatchesSecond(&tempGrab, grab, (xE->u.u.type < GenericEvent)) &&
(!grab->confineTo ||
(grab->confineTo->realized &&
BorderSizeNotEmpty(device, grab->confineTo))))
@ -3271,7 +3271,7 @@ CheckPassiveGrabsOnWindow(
Since XGrabDeviceButton requires to specify the
modifierDevice explicitly, we don't override this choice.
*/
if (xE->u.u.type < LASTEvent)
if (xE->u.u.type < GenericEvent)
{
grab->device = device;
grab->modifierDevice = GetPairedDevice(device);