summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorPeter Hutterer <peter.hutterer@who-t.net>2009-06-01 12:06:55 +1000
committerPeter Hutterer <peter.hutterer@who-t.net>2009-06-01 13:48:43 +1000
commit80ea32ad4f1440d068e18db65830f45498703b09 (patch)
tree024fd7065db760e8ec5cd96fc81db28e8c5fe426
parent080b0331b3d1de1bab5ecdc9df175b287616e358 (diff)
dix: switch grab checking from unsigned shorts to unsigned ints
XIAnyModifier is outside of the unsigned short range. Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
-rw-r--r--dix/grabs.c32
-rw-r--r--include/inputstr.h2
2 files changed, 17 insertions, 17 deletions
diff --git a/dix/grabs.c b/dix/grabs.c
index 0df8ad175..cd90526ca 100644
--- a/dix/grabs.c
+++ b/dix/grabs.c
@@ -154,7 +154,7 @@ DeletePassiveGrab(pointer value, XID id)
}
static Mask *
-DeleteDetailFromMask(Mask *pDetailMask, unsigned short detail)
+DeleteDetailFromMask(Mask *pDetailMask, unsigned int detail)
{
Mask *mask;
int i;
@@ -177,7 +177,7 @@ static Bool
IsInGrabMask(
DetailRec firstDetail,
DetailRec secondDetail,
- unsigned short exception)
+ unsigned int exception)
{
if (firstDetail.exact == exception)
{
@@ -197,9 +197,9 @@ IsInGrabMask(
static Bool
IdenticalExactDetails(
- unsigned short firstExact,
- unsigned short secondExact,
- unsigned short exception)
+ unsigned int firstExact,
+ unsigned int secondExact,
+ unsigned int exception)
{
if ((firstExact == exception) || (secondExact == exception))
return FALSE;
@@ -214,7 +214,7 @@ static Bool
DetailSupersedesSecond(
DetailRec firstDetail,
DetailRec secondDetail,
- unsigned short exception)
+ unsigned int exception)
{
if (IsInGrabMask(firstDetail, secondDetail, exception))
return TRUE;
@@ -231,11 +231,11 @@ GrabSupersedesSecond(GrabPtr pFirstGrab, GrabPtr pSecondGrab)
{
if (!DetailSupersedesSecond(pFirstGrab->modifiersDetail,
pSecondGrab->modifiersDetail,
- (unsigned short)AnyModifier))
+ (unsigned int)AnyModifier))
return FALSE;
if (DetailSupersedesSecond(pFirstGrab->detail,
- pSecondGrab->detail, (unsigned short)AnyKey))
+ pSecondGrab->detail, (unsigned int)AnyKey))
return TRUE;
return FALSE;
@@ -274,19 +274,19 @@ GrabMatchesSecond(GrabPtr pFirstGrab, GrabPtr pSecondGrab, Bool ignoreDevice)
return TRUE;
if (DetailSupersedesSecond(pSecondGrab->detail, pFirstGrab->detail,
- (unsigned short)AnyKey)
+ (unsigned int)AnyKey)
&&
DetailSupersedesSecond(pFirstGrab->modifiersDetail,
pSecondGrab->modifiersDetail,
- (unsigned short)AnyModifier))
+ (unsigned int)AnyModifier))
return TRUE;
if (DetailSupersedesSecond(pFirstGrab->detail, pSecondGrab->detail,
- (unsigned short)AnyKey)
+ (unsigned int)AnyKey)
&&
DetailSupersedesSecond(pSecondGrab->modifiersDetail,
pFirstGrab->modifiersDetail,
- (unsigned short)AnyModifier))
+ (unsigned int)AnyModifier))
return TRUE;
return FALSE;
@@ -305,18 +305,18 @@ GrabsAreIdentical(GrabPtr pFirstGrab, GrabPtr pSecondGrab)
if (!(DetailSupersedesSecond(pFirstGrab->detail,
pSecondGrab->detail,
- (unsigned short)AnyKey) &&
+ (unsigned int)AnyKey) &&
DetailSupersedesSecond(pSecondGrab->detail,
pFirstGrab->detail,
- (unsigned short)AnyKey)))
+ (unsigned int)AnyKey)))
return FALSE;
if (!(DetailSupersedesSecond(pFirstGrab->modifiersDetail,
pSecondGrab->modifiersDetail,
- (unsigned short)AnyModifier) &&
+ (unsigned int)AnyModifier) &&
DetailSupersedesSecond(pSecondGrab->modifiersDetail,
pFirstGrab->modifiersDetail,
- (unsigned short)AnyModifier)))
+ (unsigned int)AnyModifier)))
return FALSE;
return TRUE;
diff --git a/include/inputstr.h b/include/inputstr.h
index 5c74ba391..7f6e6ca77 100644
--- a/include/inputstr.h
+++ b/include/inputstr.h
@@ -146,7 +146,7 @@ typedef struct _OtherInputMasks {
3 buttons. */
typedef struct _DetailRec { /* Grab details may be bit masks */
- unsigned short exact;
+ unsigned int exact;
Mask *pMask;
} DetailRec;