Commit 19d2dc0d authored by Gabriel Ivăncescu's avatar Gabriel Ivăncescu Committed by Alexandre Julliard

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=55231Signed-off-by: 's avatarGabriel Ivăncescu <gabrielopcode@gmail.com>
parent fddb7977
......@@ -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 */
......
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