mirror of
https://gitlab.freedesktop.org/xorg/xserver.git
synced 2025-12-30 15:30:08 +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>
(cherry picked from commit 7cf1b595c8)
This commit is contained in:
parent
acb447ef69
commit
0c809f459c
1 changed files with 2 additions and 11 deletions
13
dix/events.c
13
dix/events.c
|
|
@ -4253,17 +4253,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