mirror of
https://gitlab.freedesktop.org/xorg/xserver.git
synced 2026-01-06 17:50:12 +01:00
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
1 changed files with 2 additions and 11 deletions
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…
Add table
Reference in a new issue