Line 0
Link Here
|
|
|
1 |
* Do not send focus event when grab actually does not change |
2 |
* https://gitlab.freedesktop.org/xorg/xserver/-/commit/364d64981549544213e2bca8de6ff8a5b2b5a69e |
3 |
* |
4 |
--- dix/events.c.orig 2020-03-29 20:21:15 UTC |
5 |
+++ dix/events.c |
6 |
@@ -1532,7 +1532,9 @@ ActivatePointerGrab(DeviceIntPtr mouse, GrabPtr grab, |
7 |
mouse->spriteInfo->sprite->hotPhys.y = 0; |
8 |
ConfineCursorToWindow(mouse, grab->confineTo, FALSE, TRUE); |
9 |
} |
10 |
- DoEnterLeaveEvents(mouse, mouse->id, oldWin, grab->window, NotifyGrab); |
11 |
+ if (! (grabinfo->grab && oldWin == grabinfo->grab->window |
12 |
+ && oldWin == grab->window)) |
13 |
+ DoEnterLeaveEvents(mouse, mouse->id, oldWin, grab->window, NotifyGrab); |
14 |
mouse->valuator->motionHintWindow = NullWindow; |
15 |
if (syncEvents.playingEvents) |
16 |
grabinfo->grabTime = syncEvents.time; |
17 |
@@ -1642,7 +1644,9 @@ ActivateKeyboardGrab(DeviceIntPtr keybd, GrabPtr grab, |
18 |
oldWin = keybd->focus->win; |
19 |
if (keybd->valuator) |
20 |
keybd->valuator->motionHintWindow = NullWindow; |
21 |
- if (oldWin) |
22 |
+ if (oldWin && |
23 |
+ ! (grabinfo->grab && oldWin == grabinfo->grab->window |
24 |
+ && oldWin == grab->window)) |
25 |
DoFocusEvents(keybd, oldWin, grab->window, NotifyGrab); |
26 |
if (syncEvents.playingEvents) |
27 |
grabinfo->grabTime = syncEvents.time; |