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 */
|
/* Check for XI grabs first */
|
||||||
tempGrab.type = GetXIType((InternalEvent*)event);
|
tempGrab.type = GetXIType((InternalEvent*)event);
|
||||||
|
tempGrab.grabtype = GRABTYPE_XI;
|
||||||
if (GrabMatchesSecond(&tempGrab, grab, FALSE))
|
if (GrabMatchesSecond(&tempGrab, grab, FALSE))
|
||||||
match = XI_MATCH;
|
match = XI_MATCH;
|
||||||
/* Check for a core grab (ignore the device when comparing) */
|
/* Check for a core grab (ignore the device when comparing) */
|
||||||
if (!match && checkCore &&
|
if (!match && checkCore)
|
||||||
(tempGrab.type = GetCoreType((InternalEvent*)event)) &&
|
{
|
||||||
(GrabMatchesSecond(&tempGrab, grab, TRUE)))
|
tempGrab.grabtype = GRABTYPE_CORE;
|
||||||
|
if ((tempGrab.type = GetCoreType((InternalEvent*)event)) &&
|
||||||
|
(GrabMatchesSecond(&tempGrab, grab, TRUE)))
|
||||||
match = CORE_MATCH;
|
match = CORE_MATCH;
|
||||||
|
}
|
||||||
|
|
||||||
if (match && (!grab->confineTo ||
|
if (match && (!grab->confineTo ||
|
||||||
(grab->confineTo->realized &&
|
(grab->confineTo->realized &&
|
||||||
|
|
|
@ -254,6 +254,10 @@ GrabSupersedesSecond(GrabPtr pFirstGrab, GrabPtr pSecondGrab)
|
||||||
Bool
|
Bool
|
||||||
GrabMatchesSecond(GrabPtr pFirstGrab, GrabPtr pSecondGrab, Bool ignoreDevice)
|
GrabMatchesSecond(GrabPtr pFirstGrab, GrabPtr pSecondGrab, Bool ignoreDevice)
|
||||||
{
|
{
|
||||||
|
|
||||||
|
if (pFirstGrab->grabtype != pSecondGrab->grabtype)
|
||||||
|
return FALSE;
|
||||||
|
|
||||||
if (!ignoreDevice &&
|
if (!ignoreDevice &&
|
||||||
((pFirstGrab->device != pSecondGrab->device) ||
|
((pFirstGrab->device != pSecondGrab->device) ||
|
||||||
(pFirstGrab->modifierDevice != pSecondGrab->modifierDevice)))
|
(pFirstGrab->modifierDevice != pSecondGrab->modifierDevice)))
|
||||||
|
@ -288,6 +292,9 @@ GrabMatchesSecond(GrabPtr pFirstGrab, GrabPtr pSecondGrab, Bool ignoreDevice)
|
||||||
static Bool
|
static Bool
|
||||||
GrabsAreIdentical(GrabPtr pFirstGrab, GrabPtr pSecondGrab)
|
GrabsAreIdentical(GrabPtr pFirstGrab, GrabPtr pSecondGrab)
|
||||||
{
|
{
|
||||||
|
if (pFirstGrab->grabtype != pSecondGrab->grabtype)
|
||||||
|
return FALSE;
|
||||||
|
|
||||||
if (pFirstGrab->device != pSecondGrab->device ||
|
if (pFirstGrab->device != pSecondGrab->device ||
|
||||||
(pFirstGrab->modifierDevice != pSecondGrab->modifierDevice) ||
|
(pFirstGrab->modifierDevice != pSecondGrab->modifierDevice) ||
|
||||||
(pFirstGrab->type != pSecondGrab->type))
|
(pFirstGrab->type != pSecondGrab->type))
|
||||||
|
|
Loading…
Reference in New Issue
Block a user