dix: switch EventIsDeliverable to take the event type only
Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net> Reviewed-by: Alan Coopersmith <alan.coopersmith@oracle.com> Reviewed-by: Chase Douglas <chase.douglas@canonical.com>
This commit is contained in:
parent
10a8c428fa
commit
a03fe81950
12
dix/events.c
12
dix/events.c
|
@ -2532,27 +2532,27 @@ FixUpEventFromWindow(
|
||||||
* client.
|
* client.
|
||||||
*
|
*
|
||||||
* @param[in] dev The device this event is being sent for.
|
* @param[in] dev The device this event is being sent for.
|
||||||
* @param[in] event The event that is to be sent.
|
* @param[in] evtype The event type of the event that is to be sent.
|
||||||
* @param[in] win The current event window.
|
* @param[in] win The current event window.
|
||||||
*
|
*
|
||||||
* @return Bitmask of ::EVENT_XI2_MASK, ::EVENT_XI1_MASK, ::EVENT_CORE_MASK, and
|
* @return Bitmask of ::EVENT_XI2_MASK, ::EVENT_XI1_MASK, ::EVENT_CORE_MASK, and
|
||||||
* ::EVENT_DONT_PROPAGATE_MASK.
|
* ::EVENT_DONT_PROPAGATE_MASK.
|
||||||
*/
|
*/
|
||||||
int
|
int
|
||||||
EventIsDeliverable(DeviceIntPtr dev, InternalEvent* event, WindowPtr win)
|
EventIsDeliverable(DeviceIntPtr dev, int evtype, WindowPtr win)
|
||||||
{
|
{
|
||||||
int rc = 0;
|
int rc = 0;
|
||||||
int filter = 0;
|
int filter = 0;
|
||||||
int type;
|
int type;
|
||||||
OtherInputMasks *inputMasks = wOtherInputMasks(win);
|
OtherInputMasks *inputMasks = wOtherInputMasks(win);
|
||||||
|
|
||||||
if ((type = GetXI2Type(event->any.type)) != 0)
|
if ((type = GetXI2Type(evtype)) != 0)
|
||||||
{
|
{
|
||||||
if (inputMasks && xi2mask_isset(inputMasks->xi2mask, dev, type))
|
if (inputMasks && xi2mask_isset(inputMasks->xi2mask, dev, type))
|
||||||
rc |= EVENT_XI2_MASK;
|
rc |= EVENT_XI2_MASK;
|
||||||
}
|
}
|
||||||
|
|
||||||
if ((type = GetXIType(event->any.type)) != 0)
|
if ((type = GetXIType(evtype)) != 0)
|
||||||
{
|
{
|
||||||
filter = GetEventFilterMask(dev, type);
|
filter = GetEventFilterMask(dev, type);
|
||||||
|
|
||||||
|
@ -2568,7 +2568,7 @@ EventIsDeliverable(DeviceIntPtr dev, InternalEvent* event, WindowPtr win)
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
if ((type = GetCoreType(event->any.type)) != 0)
|
if ((type = GetCoreType(evtype)) != 0)
|
||||||
{
|
{
|
||||||
filter = GetEventFilterMask(dev, type);
|
filter = GetEventFilterMask(dev, type);
|
||||||
|
|
||||||
|
@ -2667,7 +2667,7 @@ DeliverDeviceEvents(WindowPtr pWin, InternalEvent *event, GrabPtr grab,
|
||||||
|
|
||||||
while (pWin)
|
while (pWin)
|
||||||
{
|
{
|
||||||
if ((mask = EventIsDeliverable(dev, event, pWin)))
|
if ((mask = EventIsDeliverable(dev, event->any.type, pWin)))
|
||||||
{
|
{
|
||||||
/* XI2 events first */
|
/* XI2 events first */
|
||||||
if (mask & EVENT_XI2_MASK)
|
if (mask & EVENT_XI2_MASK)
|
||||||
|
|
|
@ -552,8 +552,7 @@ void FixUpEventFromWindow(SpritePtr pSprite,
|
||||||
Window child,
|
Window child,
|
||||||
Bool calcChild);
|
Bool calcChild);
|
||||||
extern WindowPtr XYToWindow(SpritePtr pSprite, int x, int y);
|
extern WindowPtr XYToWindow(SpritePtr pSprite, int x, int y);
|
||||||
extern int EventIsDeliverable(DeviceIntPtr dev, InternalEvent* event,
|
extern int EventIsDeliverable(DeviceIntPtr dev, int evtype, WindowPtr win);
|
||||||
WindowPtr win);
|
|
||||||
extern Bool ActivatePassiveGrab(DeviceIntPtr dev, GrabPtr grab,
|
extern Bool ActivatePassiveGrab(DeviceIntPtr dev, GrabPtr grab,
|
||||||
InternalEvent *ev);
|
InternalEvent *ev);
|
||||||
/**
|
/**
|
||||||
|
|
Loading…
Reference in New Issue