dix: only deliver for the current grab type
Use the grabtype to determine which type of event to send - all other events are pointless and may result in erroneous events being delivered. Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
This commit is contained in:
parent
78944d62ff
commit
7cf1b595c8
13
dix/events.c
13
dix/events.c
|
@ -4256,17 +4256,8 @@ DeliverGrabbedEvent(InternalEvent *event, DeviceIntPtr thisDev,
|
|||
|
||||
sendCore = (IsMaster(thisDev) && thisDev->coreEvents);
|
||||
/* try core event */
|
||||
if (sendCore && grab->grabtype == CORE) {
|
||||
deliveries = DeliverOneGrabbedEvent(event, thisDev, CORE);
|
||||
}
|
||||
|
||||
if (!deliveries) {
|
||||
deliveries = DeliverOneGrabbedEvent(event, thisDev, XI2);
|
||||
}
|
||||
|
||||
if (!deliveries) {
|
||||
deliveries = DeliverOneGrabbedEvent(event, thisDev, XI);
|
||||
}
|
||||
if ((sendCore && grab->grabtype == CORE) || grab->grabtype != CORE)
|
||||
deliveries = DeliverOneGrabbedEvent(event, thisDev, grab->grabtype);
|
||||
|
||||
if (deliveries && (event->any.type == ET_Motion))
|
||||
thisDev->valuator->motionHintWindow = grab->window;
|
||||
|
|
Loading…
Reference in New Issue