When a window receives FocusOut event, whether it is because the WM is grabbing the keyboard or because of an actual input focus change, we should release the pointer grab.
We will re-apply it on FocusIn event if it is necessary from Wine's perspective.
Signed-off-by: Rémi Bernon rbernon@codeweavers.com --- dlls/winex11.drv/event.c | 2 ++ 1 file changed, 2 insertions(+)
diff --git a/dlls/winex11.drv/event.c b/dlls/winex11.drv/event.c index a02f697a77d..9f0d68f26f8 100644 --- a/dlls/winex11.drv/event.c +++ b/dlls/winex11.drv/event.c @@ -896,6 +896,8 @@ static BOOL X11DRV_FocusOut( HWND hwnd, XEvent *xev ) } if (!hwnd) return FALSE;
+ if (hwnd == GetForegroundWindow()) ungrab_clipping_window(); + /* ignore wm specific NotifyUngrab / NotifyGrab events w.r.t focus */ if (event->mode == NotifyGrab || event->mode == NotifyUngrab) return FALSE;