-- v2: win32u: Don't clip captured mouse pointer only if it's done by the system.
From: Gabriel Ivăncescu gabrielopcode@gmail.com
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..cc73c004739 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)) : FALSE; +} + /*********************************************************************** * 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 */
Hi,
It looks like your patch introduced the new failures shown below. Please investigate and fix them before resubmitting your patch. If they are not new, fixing them anyway would help a lot. Otherwise please ask for the known failures list to be updated.
The tests also ran into some preexisting test failures. If you know how to fix them that would be helpful. See the TestBot job for the details:
The full results can be found at: https://testbot.winehq.org/JobDetails.pl?Key=134832
Your paranoid android.
=== debian11b (64 bit WoW report) ===
Report validation errors: win32u:win32u returned success despite having failures
Rémi Bernon (@rbernon) commented about dlls/win32u/input.c:
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)) : FALSE;
```suggestion:-0+0 return NtUserGetGUIThreadInfo( GetCurrentThreadId(), &info ) && info.hwndCapture && (info.flags & (GUI_INMOVESIZE | GUI_INMENUMODE)); ```