Module: wine Branch: master Commit: 19d2dc0dfc22d0fc1255a462be6494906b9bd3e8 URL: https://gitlab.winehq.org/wine/wine/-/commit/19d2dc0dfc22d0fc1255a462be64949...
Author: Gabriel Ivăncescu gabrielopcode@gmail.com Date: Thu Jul 27 16:30:04 2023 +0300
win32u: Don't clip captured mouse pointer if it's done by the system.
We have similar checks in X11DRV_SetCapture for example, where this would have been moved before the merge to win32u.
Wine-Bug: https://bugs.winehq.org/show_bug.cgi?id=55231 Signed-off-by: Gabriel Ivăncescu gabrielopcode@gmail.com
---
dlls/win32u/input.c | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-)
diff --git a/dlls/win32u/input.c b/dlls/win32u/input.c index 0c462f42675..1f9e48423fc 100644 --- a/dlls/win32u/input.c +++ b/dlls/win32u/input.c @@ -2461,6 +2461,13 @@ BOOL WINAPI NtUserIsMouseInPointerEnabled(void) return FALSE; }
+static BOOL is_captured_by_system(void) +{ + GUITHREADINFO info; + info.cbSize = sizeof(info); + return NtUserGetGUIThreadInfo( GetCurrentThreadId(), &info ) && info.hwndCapture && (info.flags & (GUI_INMOVESIZE | GUI_INMENUMODE)); +} + /*********************************************************************** * clip_fullscreen_window * @@ -2486,7 +2493,7 @@ BOOL clip_fullscreen_window( HWND hwnd, BOOL reset )
if (!NtUserGetWindowRect( hwnd, &rect )) return FALSE; if (!NtUserIsWindowRectFullScreen( &rect )) return FALSE; - if (get_capture()) return FALSE; + if (is_captured_by_system()) return FALSE; if (NtGetTickCount() - thread_info->clipping_reset < 1000) return FALSE; if (!reset && clipping_cursor && thread_info->clipping_cursor) return FALSE; /* already clipping */