dix: if grab types differ, two grabs cannot be the same.
This commit is contained in:
parent
63a3c727b3
commit
834ea071b6
10
dix/events.c
10
dix/events.c
|
@ -3323,13 +3323,17 @@ CheckPassiveGrabsOnWindow(
|
|||
|
||||
/* Check for XI grabs first */
|
||||
tempGrab.type = GetXIType((InternalEvent*)event);
|
||||
tempGrab.grabtype = GRABTYPE_XI;
|
||||
if (GrabMatchesSecond(&tempGrab, grab, FALSE))
|
||||
match = XI_MATCH;
|
||||
/* Check for a core grab (ignore the device when comparing) */
|
||||
if (!match && checkCore &&
|
||||
(tempGrab.type = GetCoreType((InternalEvent*)event)) &&
|
||||
(GrabMatchesSecond(&tempGrab, grab, TRUE)))
|
||||
if (!match && checkCore)
|
||||
{
|
||||
tempGrab.grabtype = GRABTYPE_CORE;
|
||||
if ((tempGrab.type = GetCoreType((InternalEvent*)event)) &&
|
||||
(GrabMatchesSecond(&tempGrab, grab, TRUE)))
|
||||
match = CORE_MATCH;
|
||||
}
|
||||
|
||||
if (match && (!grab->confineTo ||
|
||||
(grab->confineTo->realized &&
|
||||
|
|
|
@ -254,6 +254,10 @@ GrabSupersedesSecond(GrabPtr pFirstGrab, GrabPtr pSecondGrab)
|
|||
Bool
|
||||
GrabMatchesSecond(GrabPtr pFirstGrab, GrabPtr pSecondGrab, Bool ignoreDevice)
|
||||
{
|
||||
|
||||
if (pFirstGrab->grabtype != pSecondGrab->grabtype)
|
||||
return FALSE;
|
||||
|
||||
if (!ignoreDevice &&
|
||||
((pFirstGrab->device != pSecondGrab->device) ||
|
||||
(pFirstGrab->modifierDevice != pSecondGrab->modifierDevice)))
|
||||
|
@ -288,6 +292,9 @@ GrabMatchesSecond(GrabPtr pFirstGrab, GrabPtr pSecondGrab, Bool ignoreDevice)
|
|||
static Bool
|
||||
GrabsAreIdentical(GrabPtr pFirstGrab, GrabPtr pSecondGrab)
|
||||
{
|
||||
if (pFirstGrab->grabtype != pSecondGrab->grabtype)
|
||||
return FALSE;
|
||||
|
||||
if (pFirstGrab->device != pSecondGrab->device ||
|
||||
(pFirstGrab->modifierDevice != pSecondGrab->modifierDevice) ||
|
||||
(pFirstGrab->type != pSecondGrab->type))
|
||||
|
|
Loading…
Reference in New Issue
Block a user