diff --git a/Xi/exevents.c b/Xi/exevents.c index 659816a46..98319ad4d 100644 --- a/Xi/exevents.c +++ b/Xi/exevents.c @@ -746,9 +746,8 @@ UpdateDeviceMotionMask(DeviceIntPtr device, unsigned short state, { Mask mask; - mask = DevicePointerMotionMask | state | motion_mask; - SetMaskForEvent(device->id, mask, DeviceMotionNotify); mask = PointerMotionMask | state | motion_mask; + SetMaskForEvent(device->id, mask, DeviceMotionNotify); SetMaskForEvent(device->id, mask, MotionNotify); } @@ -2522,6 +2521,12 @@ FreeInputMask(OtherInputMasks ** imask) *imask = NULL; } +#define XIPropagateMask (KeyPressMask | \ + KeyReleaseMask | \ + ButtonPressMask | \ + ButtonReleaseMask | \ + PointerMotionMask) + void RecalculateDeviceDeliverableEvents(WindowPtr pWin) { @@ -2548,7 +2553,7 @@ RecalculateDeviceDeliverableEvents(WindowPtr pWin) inputMasks->deliverableEvents[i] |= (wOtherInputMasks(tmp)->deliverableEvents[i] & ~inputMasks->dontPropagateMask[i] & - PropagateMask[i]); + XIPropagateMask); } if (pChild->firstChild) { pChild = pChild->firstChild; @@ -2961,7 +2966,7 @@ DeviceEventSuppressForWindow(WindowPtr pWin, ClientPtr client, Mask mask, { struct _OtherInputMasks *inputMasks = wOtherInputMasks(pWin); - if (mask & ~PropagateMask[maskndx]) { + if (mask & ~XIPropagateMask) { client->errorValue = mask; return BadValue; } diff --git a/Xi/exglobals.h b/Xi/exglobals.h index 9f235e034..461a7f8ca 100644 --- a/Xi/exglobals.h +++ b/Xi/exglobals.h @@ -44,7 +44,6 @@ extern int DeviceBusy; extern int BadClass; /* Note: only the ones needed in files other than extinit.c are declared */ -extern const Mask DevicePointerMotionMask; extern const Mask DevicePointerMotionHintMask; extern const Mask DeviceFocusChangeMask; extern const Mask DeviceStateNotifyMask; @@ -56,8 +55,6 @@ extern const Mask DevicePresenceNotifyMask; extern const Mask DevicePropertyNotifyMask; extern const Mask XIAllMasks; -extern Mask PropagateMask[]; - extern int DeviceValuator; extern int DeviceKeyPress; extern int DeviceKeyRelease; diff --git a/Xi/extinit.c b/Xi/extinit.c index ecb55da42..8d9120866 100644 --- a/Xi/extinit.c +++ b/Xi/extinit.c @@ -129,13 +129,8 @@ SOFTWARE. * breaks down. The device needs the dev->button->motionMask. If DBMM is * the same as BMM, we can ensure that both core and device events can be * delivered, without the need for extra structures in the DeviceIntRec. */ -const Mask DeviceKeyPressMask = KeyPressMask; -const Mask DeviceKeyReleaseMask = KeyReleaseMask; -const Mask DeviceButtonPressMask = ButtonPressMask; -const Mask DeviceButtonReleaseMask = ButtonReleaseMask; const Mask DeviceProximityMask = (1L << 4); const Mask DeviceStateNotifyMask = (1L << 5); -const Mask DevicePointerMotionMask = PointerMotionMask; const Mask DevicePointerMotionHintMask = PointerMotionHintMask; const Mask DeviceButton1MotionMask = Button1MotionMask; const Mask DeviceButton2MotionMask = Button2MotionMask; @@ -363,8 +358,6 @@ RESTYPE RT_INPUTCLIENT; extern XExtensionVersion XIVersion; -Mask PropagateMask[EMASKSIZE]; - /***************************************************************** * * Versioning support @@ -914,22 +907,6 @@ XI2EventSwap(xGenericEvent *from, xGenericEvent *to) } } -/************************************************************************** - * - * Allow the specified event to have its propagation suppressed. - * The default is to not allow suppression of propagation. - * - */ - -static void -AllowPropagateSuppress(Mask mask) -{ - int i; - - for (i = 0; i < MAXDEVICES; i++) - PropagateMask[i] |= mask; -} - /************************************************************************** * * Record an event mask where there is no unique corresponding event type. @@ -1011,20 +988,16 @@ FixExtensionEvents(ExtensionEntry * extEntry) DeviceBusy += extEntry->errorBase; BadClass += extEntry->errorBase; - SetMaskForExtEvent(DeviceKeyPressMask, DeviceKeyPress); - AllowPropagateSuppress(DeviceKeyPressMask); + SetMaskForExtEvent(KeyPressMask, DeviceKeyPress); SetCriticalEvent(DeviceKeyPress); - SetMaskForExtEvent(DeviceKeyReleaseMask, DeviceKeyRelease); - AllowPropagateSuppress(DeviceKeyReleaseMask); + SetMaskForExtEvent(KeyReleaseMask, DeviceKeyRelease); SetCriticalEvent(DeviceKeyRelease); - SetMaskForExtEvent(DeviceButtonPressMask, DeviceButtonPress); - AllowPropagateSuppress(DeviceButtonPressMask); + SetMaskForExtEvent(ButtonPressMask, DeviceButtonPress); SetCriticalEvent(DeviceButtonPress); - SetMaskForExtEvent(DeviceButtonReleaseMask, DeviceButtonRelease); - AllowPropagateSuppress(DeviceButtonReleaseMask); + SetMaskForExtEvent(ButtonReleaseMask, DeviceButtonRelease); SetCriticalEvent(DeviceButtonRelease); SetMaskForExtEvent(DeviceProximityMask, ProximityIn); @@ -1032,8 +1005,7 @@ FixExtensionEvents(ExtensionEntry * extEntry) SetMaskForExtEvent(DeviceStateNotifyMask, DeviceStateNotify); - SetMaskForExtEvent(DevicePointerMotionMask, DeviceMotionNotify); - AllowPropagateSuppress(DevicePointerMotionMask); + SetMaskForExtEvent(PointerMotionMask, DeviceMotionNotify); SetCriticalEvent(DeviceMotionNotify); SetEventInfo(DevicePointerMotionHintMask, _devicePointerMotionHint);