Fixes cursor not being released when alt-tabbing out of an unresponsive foreground window.
From: Rémi Bernon rbernon@codeweavers.com
Fixes cursor not being released when alt-tabbing out of an unresponsive foreground window. --- dlls/winex11.drv/event.c | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-)
diff --git a/dlls/winex11.drv/event.c b/dlls/winex11.drv/event.c index c3c8d9a4070..053c0e2ff47 100644 --- a/dlls/winex11.drv/event.c +++ b/dlls/winex11.drv/event.c @@ -843,7 +843,13 @@ static BOOL X11DRV_FocusOut( HWND hwnd, XEvent *xev )
if (event->detail == NotifyPointer) { - if (!hwnd && event->window == x11drv_thread_data()->clip_window) NtUserClipCursor( NULL ); + if (!hwnd && event->window == x11drv_thread_data()->clip_window) + { + NtUserClipCursor( NULL ); + /* NtUserClipCursor will ask the foreground window to ungrab the cursor, but + * it might not be responsive, so unmap the clipping window ourselves too */ + XUnmapWindow( event->display, event->window ); + } return TRUE; } if (!hwnd) return FALSE;