Commit 8a41431d authored by Jan Burgmeier's avatar Jan Burgmeier

dix: Do not send events in keyboard/pointer grab if old and new window are the same.

This fixes a bug in Citrix Workspace App when
TransparentKeyPassthrough=true is set in wfclient.ini and the session is
in window mode. I assume Citrix Workspace App sends a GrabKeyboard although
it already has the keyboard grabbed and in it's focus out/in events
ungrabs/grabs the keyboard again. This leads to an endless loop where the
Citrix Workspace App toggles grab/ungrab ob keyboard and this makes the
xserver unresponsive and cpu usage on one core goes to 100%

The fix from 364d6498 did not work here because grabinfo->grab was NULL
parent ce9455b5
Pipeline #48821 passed with stages
in 9 minutes and 19 seconds
......@@ -1530,8 +1530,8 @@ ActivatePointerGrab(DeviceIntPtr mouse, GrabPtr grab,
mouse->spriteInfo->sprite->hotPhys.y = 0;
ConfineCursorToWindow(mouse, grab->confineTo, FALSE, TRUE);
}
if (! (grabinfo->grab && oldWin == grabinfo->grab->window
&& oldWin == grab->window))
if (! (grabinfo->grab && oldWin == grabinfo->grab->window) &&
oldWin != grab->window)
DoEnterLeaveEvents(mouse, mouse->id, oldWin, grab->window, NotifyGrab);
mouse->valuator->motionHintWindow = NullWindow;
if (syncEvents.playingEvents)
......@@ -1643,8 +1643,8 @@ ActivateKeyboardGrab(DeviceIntPtr keybd, GrabPtr grab, TimeStamp time,
if (keybd->valuator)
keybd->valuator->motionHintWindow = NullWindow;
if (oldWin &&
! (grabinfo->grab && oldWin == grabinfo->grab->window
&& oldWin == grab->window))
! (grabinfo->grab && oldWin == grabinfo->grab->window) &&
oldWin != grab->window)
DoFocusEvents(keybd, oldWin, grab->window, NotifyGrab);
if (syncEvents.playingEvents)
grabinfo->grabTime = syncEvents.time;
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment