This uses a new hardware message with Wine internal WM_WINE_CLIPCURSOR message, to notify the foreground window of ClipCursor calls, or resets. It could possibly have used posted messages, like is done to request the desktop to release the clipping rectangle but I figured that a hardware message could be appropriate and is possibly the preferred mechanism to notify the foreground window.
We use QS_RAWINPUT for convenience here, as to automatically release the hardware message, and because this message is somewhat low-level. It could be anything, and maybe QS_MOUSEMOVE, but we'd have to then manually call accept_hardware_message from win32u.
The desktop posted message is kept, as there's no guarantee that the foreground window will be processing its hardware messages when we need, and/or that the desktop window is foreground.
-- v2: winex11: Remove now unnecessary ClipCursor forwarding to foreground thread. win32u: Asynchronously apply or reset ClipCursor from the hardware message. server: Queue a hardware WM_WINE_CLIPCURSOR message to the foreground thread. server: Use a separate helper to merge WM_MOUSEMOVE messages. server: Use the helper to reset the clip rect when the desktop size changes. win32u: Add a reset parameter to WM_WINE_CLIPCURSOR and driver ClipCursor.
From: Rémi Bernon rbernon@codeweavers.com
--- dlls/win32u/driver.c | 6 +++--- dlls/win32u/input.c | 10 +++++----- dlls/win32u/message.c | 2 +- dlls/win32u/win32u_private.h | 2 +- dlls/winemac.drv/macdrv.h | 3 +-- dlls/winemac.drv/mouse.c | 6 ++++-- dlls/winex11.drv/mouse.c | 13 +++++++------ dlls/winex11.drv/x11drv.h | 2 +- include/wine/gdi_driver.h | 2 +- 9 files changed, 24 insertions(+), 22 deletions(-)
diff --git a/dlls/win32u/driver.c b/dlls/win32u/driver.c index d4c1c722203..26bdbe7baf6 100644 --- a/dlls/win32u/driver.c +++ b/dlls/win32u/driver.c @@ -752,7 +752,7 @@ static BOOL nulldrv_SetCursorPos( INT x, INT y ) return TRUE; }
-static BOOL nulldrv_ClipCursor( LPCRECT clip ) +static BOOL nulldrv_ClipCursor( const RECT *clip, BOOL reset ) { return TRUE; } @@ -1133,9 +1133,9 @@ static BOOL loaderdrv_SetCursorPos( INT x, INT y ) return load_driver()->pSetCursorPos( x, y ); }
-static BOOL loaderdrv_ClipCursor( const RECT *clip ) +static BOOL loaderdrv_ClipCursor( const RECT *clip, BOOL reset ) { - return load_driver()->pClipCursor( clip ); + return load_driver()->pClipCursor( clip, reset ); }
static LRESULT nulldrv_ClipboardWindowProc( HWND hwnd, UINT msg, WPARAM wparam, LPARAM lparam ) diff --git a/dlls/win32u/input.c b/dlls/win32u/input.c index 22f371969b9..2df1266041d 100644 --- a/dlls/win32u/input.c +++ b/dlls/win32u/input.c @@ -2497,16 +2497,16 @@ BOOL get_clip_cursor( RECT *rect ) return ret; }
-BOOL process_wine_clipcursor( BOOL empty ) +BOOL process_wine_clipcursor( BOOL empty, BOOL reset ) { RECT rect;
- TRACE( "empty %u\n", empty ); + TRACE( "empty %u, reset %u\n", empty, reset );
- if (empty) return user_driver->pClipCursor( NULL ); + if (empty || reset) return user_driver->pClipCursor( NULL, reset );
get_clip_cursor( &rect ); - return user_driver->pClipCursor( &rect ); + return user_driver->pClipCursor( &rect, FALSE ); }
/*********************************************************************** @@ -2552,6 +2552,6 @@ BOOL WINAPI NtUserClipCursor( const RECT *rect ) } } SERVER_END_REQ; - if (ret) user_driver->pClipCursor( &new_rect ); + if (ret) user_driver->pClipCursor( &new_rect, FALSE ); return ret; } diff --git a/dlls/win32u/message.c b/dlls/win32u/message.c index 44cd0640434..cc6a36449d9 100644 --- a/dlls/win32u/message.c +++ b/dlls/win32u/message.c @@ -1272,7 +1272,7 @@ static LRESULT handle_internal_message( HWND hwnd, UINT msg, WPARAM wparam, LPAR return call_current_hook( h_extra->handle, HC_ACTION, wparam, h_extra->lparam ); } case WM_WINE_CLIPCURSOR: - return process_wine_clipcursor( wparam ); + return process_wine_clipcursor( wparam, lparam ); case WM_WINE_UPDATEWINDOWSTATE: update_window_state( hwnd ); return 0; diff --git a/dlls/win32u/win32u_private.h b/dlls/win32u/win32u_private.h index a459db75d94..45e58093ba4 100644 --- a/dlls/win32u/win32u_private.h +++ b/dlls/win32u/win32u_private.h @@ -101,7 +101,7 @@ extern BOOL set_foreground_window( HWND hwnd, BOOL mouse ) DECLSPEC_HIDDEN; extern void toggle_caret( HWND hwnd ) DECLSPEC_HIDDEN; extern void update_mouse_tracking_info( HWND hwnd ) DECLSPEC_HIDDEN; extern BOOL get_clip_cursor( RECT *rect ) DECLSPEC_HIDDEN; -extern BOOL process_wine_clipcursor( BOOL empty ) DECLSPEC_HIDDEN; +extern BOOL process_wine_clipcursor( BOOL empty, BOOL reset ) DECLSPEC_HIDDEN;
/* menu.c */ extern HMENU create_menu( BOOL is_popup ) DECLSPEC_HIDDEN; diff --git a/dlls/winemac.drv/macdrv.h b/dlls/winemac.drv/macdrv.h index af104a130fe..d857a7d0919 100644 --- a/dlls/winemac.drv/macdrv.h +++ b/dlls/winemac.drv/macdrv.h @@ -133,7 +133,7 @@ extern BOOL macdrv_UpdateDisplayDevices( const struct gdi_device_manager *device BOOL force, void *param ) DECLSPEC_HIDDEN; extern BOOL macdrv_GetDeviceGammaRamp(PHYSDEV dev, LPVOID ramp) DECLSPEC_HIDDEN; extern BOOL macdrv_SetDeviceGammaRamp(PHYSDEV dev, LPVOID ramp) DECLSPEC_HIDDEN; -extern BOOL macdrv_ClipCursor(LPCRECT clip) DECLSPEC_HIDDEN; +extern BOOL macdrv_ClipCursor(const RECT *clip, BOOL reset) DECLSPEC_HIDDEN; extern LRESULT macdrv_DesktopWindowProc(HWND hwnd, UINT msg, WPARAM wparam, LPARAM lparam) DECLSPEC_HIDDEN; extern void macdrv_DestroyWindow(HWND hwnd) DECLSPEC_HIDDEN; extern void macdrv_SetDesktopWindow(HWND hwnd) DECLSPEC_HIDDEN; @@ -157,7 +157,6 @@ extern void macdrv_WindowPosChanged(HWND hwnd, HWND insert_after, UINT swp_flags const RECT *visible_rect, const RECT *valid_rects, struct window_surface *surface) DECLSPEC_HIDDEN; extern void macdrv_DestroyCursorIcon(HCURSOR cursor) DECLSPEC_HIDDEN; -extern BOOL macdrv_ClipCursor(LPCRECT clip) DECLSPEC_HIDDEN; extern BOOL macdrv_GetCursorPos(LPPOINT pos) DECLSPEC_HIDDEN; extern void macdrv_SetCapture(HWND hwnd, UINT flags) DECLSPEC_HIDDEN; extern void macdrv_SetCursor(HCURSOR cursor) DECLSPEC_HIDDEN; diff --git a/dlls/winemac.drv/mouse.c b/dlls/winemac.drv/mouse.c index cb194095d55..1ff0f631fe6 100644 --- a/dlls/winemac.drv/mouse.c +++ b/dlls/winemac.drv/mouse.c @@ -659,11 +659,13 @@ void macdrv_DestroyCursorIcon(HCURSOR cursor) * * Set the cursor clipping rectangle. */ -BOOL macdrv_ClipCursor(LPCRECT clip) +BOOL macdrv_ClipCursor(const RECT *clip, BOOL reset) { CGRect rect;
- TRACE("%s\n", wine_dbgstr_rect(clip)); + TRACE("%s %u\n", wine_dbgstr_rect(clip), reset); + + if (reset) return TRUE;
if (clip) { diff --git a/dlls/winex11.drv/mouse.c b/dlls/winex11.drv/mouse.c index fc35081652c..8d23facea99 100644 --- a/dlls/winex11.drv/mouse.c +++ b/dlls/winex11.drv/mouse.c @@ -1557,17 +1557,18 @@ BOOL X11DRV_GetCursorPos(LPPOINT pos) /*********************************************************************** * ClipCursor (X11DRV.@) */ -BOOL X11DRV_ClipCursor( LPCRECT clip ) +BOOL X11DRV_ClipCursor( const RECT *clip, BOOL reset ) { - RECT virtual_rect = NtUserGetVirtualScreenRect(); + TRACE( "clip %p, reset %u\n", clip, reset );
- if (!clip) clip = &virtual_rect; - - if (grab_pointer) + if (!reset && grab_pointer) { + RECT virtual_rect = NtUserGetVirtualScreenRect(); HWND foreground = NtUserGetForegroundWindow(); DWORD tid, pid;
+ if (!clip) clip = &virtual_rect; + /* forward request to the foreground window if it's in a different thread */ tid = NtUserGetWindowThread( foreground, &pid ); if (tid && tid != GetCurrentThreadId() && pid == GetCurrentProcessId()) @@ -1615,7 +1616,7 @@ LRESULT clip_cursor_request( HWND hwnd, BOOL fullscreen, BOOL reset ) else { NtUserGetClipCursor( &clip ); - X11DRV_ClipCursor( &clip ); + X11DRV_ClipCursor( &clip, FALSE ); }
return 0; diff --git a/dlls/winex11.drv/x11drv.h b/dlls/winex11.drv/x11drv.h index 9f6ba45d175..aea62c90b7c 100644 --- a/dlls/winex11.drv/x11drv.h +++ b/dlls/winex11.drv/x11drv.h @@ -216,7 +216,7 @@ extern void X11DRV_DestroyCursorIcon( HCURSOR handle ) DECLSPEC_HIDDEN; extern void X11DRV_SetCursor( HCURSOR handle ) DECLSPEC_HIDDEN; extern BOOL X11DRV_SetCursorPos( INT x, INT y ) DECLSPEC_HIDDEN; extern BOOL X11DRV_GetCursorPos( LPPOINT pos ) DECLSPEC_HIDDEN; -extern BOOL X11DRV_ClipCursor( LPCRECT clip ) DECLSPEC_HIDDEN; +extern BOOL X11DRV_ClipCursor( const RECT *clip, BOOL reset ) DECLSPEC_HIDDEN; extern LONG X11DRV_ChangeDisplaySettings( LPDEVMODEW displays, LPCWSTR primary_name, HWND hwnd, DWORD flags, LPVOID lpvoid ) DECLSPEC_HIDDEN; extern BOOL X11DRV_GetCurrentDisplaySettings( LPCWSTR name, BOOL is_primary, LPDEVMODEW devmode ) DECLSPEC_HIDDEN; extern INT X11DRV_GetDisplayDepth( LPCWSTR name, BOOL is_primary ) DECLSPEC_HIDDEN; diff --git a/include/wine/gdi_driver.h b/include/wine/gdi_driver.h index dc9a1b40d38..ff7d61a1274 100644 --- a/include/wine/gdi_driver.h +++ b/include/wine/gdi_driver.h @@ -301,7 +301,7 @@ struct user_driver_funcs void (*pSetCursor)(HCURSOR); BOOL (*pGetCursorPos)(LPPOINT); BOOL (*pSetCursorPos)(INT,INT); - BOOL (*pClipCursor)(LPCRECT); + BOOL (*pClipCursor)(const RECT*,BOOL); /* clipboard functions */ LRESULT (*pClipboardWindowProc)(HWND,UINT,WPARAM,LPARAM); void (*pUpdateClipboard)(void);
From: Rémi Bernon rbernon@codeweavers.com
--- server/queue.c | 2 +- server/user.h | 1 + server/window.c | 2 +- 3 files changed, 3 insertions(+), 2 deletions(-)
diff --git a/server/queue.c b/server/queue.c index 0c7d2c50a49..a376d7ab43f 100644 --- a/server/queue.c +++ b/server/queue.c @@ -450,7 +450,7 @@ static void get_message_defaults( struct msg_queue *queue, int *x, int *y, unsig }
/* set the cursor clip rectangle */ -static void set_clip_rectangle( struct desktop *desktop, const rectangle_t *rect, int send_clip_msg ) +void set_clip_rectangle( struct desktop *desktop, const rectangle_t *rect, int send_clip_msg ) { rectangle_t top_rect; int x, y; diff --git a/server/user.h b/server/user.h index 530e91c0c09..dde7a3308d7 100644 --- a/server/user.h +++ b/server/user.h @@ -109,6 +109,7 @@ extern void queue_cleanup_window( struct thread *thread, user_handle_t win ); extern int init_thread_queue( struct thread *thread ); extern int attach_thread_input( struct thread *thread_from, struct thread *thread_to ); extern void detach_thread_input( struct thread *thread_from ); +extern void set_clip_rectangle( struct desktop *desktop, const rectangle_t *rect, int send_clip_msg ); extern void post_message( user_handle_t win, unsigned int message, lparam_t wparam, lparam_t lparam ); extern void send_notify_message( user_handle_t win, unsigned int message, diff --git a/server/window.c b/server/window.c index 01082b90b69..9db8ccbe27e 100644 --- a/server/window.c +++ b/server/window.c @@ -1829,7 +1829,7 @@ static void set_window_pos( struct window *win, struct window *previous, }
/* reset cursor clip rectangle when the desktop changes size */ - if (win == win->desktop->top_window) win->desktop->cursor.clip = *window_rect; + if (win == win->desktop->top_window) set_clip_rectangle( win->desktop, NULL, 1 );
/* if the window is not visible, everything is easy */ if (!visible) return;
From: Rémi Bernon rbernon@codeweavers.com
--- server/queue.c | 13 +++++++++---- 1 file changed, 9 insertions(+), 4 deletions(-)
diff --git a/server/queue.c b/server/queue.c index a376d7ab43f..3841e75b8d8 100644 --- a/server/queue.c +++ b/server/queue.c @@ -577,13 +577,12 @@ static inline unsigned int get_unique_id(void) return id; }
-/* try to merge a message with the last in the list; return 1 if successful */ -static int merge_message( struct thread_input *input, const struct message *msg ) +/* try to merge a WM_MOUSEMOVE message with the last in the list; return 1 if successful */ +static int merge_mousemove( struct thread_input *input, const struct message *msg ) { struct message *prev; struct list *ptr;
- if (msg->msg != WM_MOUSEMOVE) return 0; for (ptr = list_tail( &input->msg_list ); ptr; ptr = list_prev( &input->msg_list, ptr )) { prev = LIST_ENTRY( ptr, struct message, entry ); @@ -611,6 +610,13 @@ static int merge_message( struct thread_input *input, const struct message *msg return 1; }
+/* try to merge a message with the messages in the list; return 1 if successful */ +static int merge_message( struct thread_input *input, const struct message *msg ) +{ + if (msg->msg == WM_MOUSEMOVE) return merge_mousemove( input, msg ); + return 0; +} + /* free a result structure */ static void free_result( struct message_result *result ) { @@ -1564,7 +1570,6 @@ static void queue_hardware_message( struct desktop *desktop, struct message *msg
update_input_key_state( desktop, desktop->keystate, msg->msg, msg->wparam ); last_input_time = get_tick_count(); - if (msg->msg != WM_MOUSEMOVE) always_queue = 1;
switch (get_hardware_msg_bit( msg )) {
From: Rémi Bernon rbernon@codeweavers.com
When applying a new cursor clipping rect, or to the previous foreground thread when foreground changes, to notify it of the cursor clipping rect being reset. --- server/queue.c | 54 +++++++++++++++++++++++++++++++++++++++++++++++--- server/user.h | 2 +- 2 files changed, 52 insertions(+), 4 deletions(-)
diff --git a/server/queue.c b/server/queue.c index 3841e75b8d8..2fc54e36b3f 100644 --- a/server/queue.c +++ b/server/queue.c @@ -449,8 +449,25 @@ static void get_message_defaults( struct msg_queue *queue, int *x, int *y, unsig *time = get_tick_count(); }
+static void queue_clip_cursor_msg( struct desktop *desktop, lparam_t wparam, lparam_t lparam ) +{ + static const struct hw_msg_source source = { IMDT_UNAVAILABLE, IMO_SYSTEM }; + struct thread_input *input; + struct message *msg; + + if (!(msg = alloc_hardware_message( 0, source, get_tick_count(), 0 ))) return; + + msg->msg = WM_WINE_CLIPCURSOR; + msg->wparam = wparam; + msg->lparam = lparam; + msg->x = desktop->cursor.x; + msg->y = desktop->cursor.y; + if ((input = desktop->foreground_input)) msg->win = input->active; + queue_hardware_message( desktop, msg, 1 ); +} + /* set the cursor clip rectangle */ -void set_clip_rectangle( struct desktop *desktop, const rectangle_t *rect, int send_clip_msg ) +void set_clip_rectangle( struct desktop *desktop, const rectangle_t *rect, int reset ) { rectangle_t top_rect; int x, y; @@ -468,12 +485,16 @@ void set_clip_rectangle( struct desktop *desktop, const rectangle_t *rect, int s } else desktop->cursor.clip = top_rect;
- if (send_clip_msg) post_desktop_message( desktop, WM_WINE_CLIPCURSOR, rect == NULL, 0 ); - /* warp the mouse to be inside the clip rect */ x = max( min( desktop->cursor.x, desktop->cursor.clip.right - 1 ), desktop->cursor.clip.left ); y = max( min( desktop->cursor.y, desktop->cursor.clip.bottom - 1 ), desktop->cursor.clip.top ); if (x != desktop->cursor.x || y != desktop->cursor.y) set_cursor_pos( desktop, x, y ); + + /* request clip cursor rectangle reset to the desktop thread */ + if (reset) post_desktop_message( desktop, WM_WINE_CLIPCURSOR, TRUE, FALSE ); + + /* notify foreground thread, of reset, or to apply new cursor clipping rect */ + queue_clip_cursor_msg( desktop, rect == NULL, reset ); }
/* change the foreground input and reset the cursor clip rect */ @@ -558,6 +579,7 @@ static inline int get_hardware_msg_bit( struct message *msg ) if (msg->msg == WM_INPUT_DEVICE_CHANGE || msg->msg == WM_INPUT) return QS_RAWINPUT; if (msg->msg == WM_MOUSEMOVE || msg->msg == WM_NCMOUSEMOVE) return QS_MOUSEMOVE; if (msg->msg >= WM_KEYFIRST && msg->msg <= WM_KEYLAST) return QS_KEY; + if (msg->msg == WM_WINE_CLIPCURSOR) return QS_RAWINPUT; return QS_MOUSEBUTTON; }
@@ -610,10 +632,36 @@ static int merge_mousemove( struct thread_input *input, const struct message *ms return 1; }
+/* try to merge a WM_WINE_CLIPCURSOR message with the last in the list; return 1 if successful */ +static int merge_wine_clipcursor( struct thread_input *input, const struct message *msg ) +{ + struct message *prev; + + LIST_FOR_EACH_ENTRY_REV( prev, &input->msg_list, struct message, entry ) + if (prev->msg == WM_WINE_CLIPCURSOR) break; + if (&prev->entry == &input->msg_list) return 0; + + if (prev->result) return 0; + if (prev->win != msg->win) return 0; + if (prev->type != msg->type) return 0; + + /* now we can merge it */ + prev->wparam = msg->wparam; + prev->lparam = msg->lparam; + prev->x = msg->x; + prev->y = msg->y; + prev->time = msg->time; + list_remove( &prev->entry ); + list_add_tail( &input->msg_list, &prev->entry ); + + return 1; +} + /* try to merge a message with the messages in the list; return 1 if successful */ static int merge_message( struct thread_input *input, const struct message *msg ) { if (msg->msg == WM_MOUSEMOVE) return merge_mousemove( input, msg ); + if (msg->msg == WM_WINE_CLIPCURSOR) return merge_wine_clipcursor( input, msg ); return 0; }
diff --git a/server/user.h b/server/user.h index dde7a3308d7..a18c94ec89d 100644 --- a/server/user.h +++ b/server/user.h @@ -109,7 +109,7 @@ extern void queue_cleanup_window( struct thread *thread, user_handle_t win ); extern int init_thread_queue( struct thread *thread ); extern int attach_thread_input( struct thread *thread_from, struct thread *thread_to ); extern void detach_thread_input( struct thread *thread_from ); -extern void set_clip_rectangle( struct desktop *desktop, const rectangle_t *rect, int send_clip_msg ); +extern void set_clip_rectangle( struct desktop *desktop, const rectangle_t *rect, int reset ); extern void post_message( user_handle_t win, unsigned int message, lparam_t wparam, lparam_t lparam ); extern void send_notify_message( user_handle_t win, unsigned int message,
From: Rémi Bernon rbernon@codeweavers.com
--- dlls/win32u/input.c | 2 +- dlls/win32u/message.c | 2 ++ 2 files changed, 3 insertions(+), 1 deletion(-)
diff --git a/dlls/win32u/input.c b/dlls/win32u/input.c index 2df1266041d..c26660319df 100644 --- a/dlls/win32u/input.c +++ b/dlls/win32u/input.c @@ -2552,6 +2552,6 @@ BOOL WINAPI NtUserClipCursor( const RECT *rect ) } } SERVER_END_REQ; - if (ret) user_driver->pClipCursor( &new_rect, FALSE ); + return ret; } diff --git a/dlls/win32u/message.c b/dlls/win32u/message.c index cc6a36449d9..7238dd1bd46 100644 --- a/dlls/win32u/message.c +++ b/dlls/win32u/message.c @@ -1766,6 +1766,8 @@ static BOOL process_hardware_message( MSG *msg, UINT hw_id, const struct hardwar ret = process_keyboard_message( msg, hw_id, hwnd_filter, first, last, remove ); else if (is_mouse_message( msg->message )) ret = process_mouse_message( msg, hw_id, msg_data->info, hwnd_filter, first, last, remove ); + else if (msg->message == WM_WINE_CLIPCURSOR) + process_wine_clipcursor( msg->wParam, msg->lParam ); else ERR( "unknown message type %x\n", msg->message ); SetThreadDpiAwarenessContext( context );
From: Rémi Bernon rbernon@codeweavers.com
--- dlls/winex11.drv/mouse.c | 23 ++--------------------- 1 file changed, 2 insertions(+), 21 deletions(-)
diff --git a/dlls/winex11.drv/mouse.c b/dlls/winex11.drv/mouse.c index 8d23facea99..4d94a97f3c8 100644 --- a/dlls/winex11.drv/mouse.c +++ b/dlls/winex11.drv/mouse.c @@ -1564,20 +1564,9 @@ BOOL X11DRV_ClipCursor( const RECT *clip, BOOL reset ) if (!reset && grab_pointer) { RECT virtual_rect = NtUserGetVirtualScreenRect(); - HWND foreground = NtUserGetForegroundWindow(); - DWORD tid, pid;
if (!clip) clip = &virtual_rect;
- /* forward request to the foreground window if it's in a different thread */ - tid = NtUserGetWindowThread( foreground, &pid ); - if (tid && tid != GetCurrentThreadId() && pid == GetCurrentProcessId()) - { - TRACE( "forwarding clip request to %p\n", foreground ); - send_notify_message( foreground, WM_X11DRV_CLIP_CURSOR_REQUEST, FALSE, FALSE ); - return TRUE; - } - /* we are clipping if the clip rectangle is smaller than the screen */ if (clip->left > virtual_rect.left || clip->right < virtual_rect.right || clip->top > virtual_rect.top || clip->bottom < virtual_rect.bottom) @@ -1589,8 +1578,8 @@ BOOL X11DRV_ClipCursor( const RECT *clip, BOOL reset ) struct x11drv_thread_data *data = x11drv_thread_data(); if (data && data->clip_hwnd) { - if (EqualRect( clip, &clip_rect ) || clip_fullscreen_window( foreground, TRUE )) - return TRUE; + if (EqualRect( clip, &clip_rect )) return TRUE; + if (clip_fullscreen_window( NtUserGetForegroundWindow(), TRUE )) return TRUE; } } } @@ -1605,20 +1594,12 @@ BOOL X11DRV_ClipCursor( const RECT *clip, BOOL reset ) */ LRESULT clip_cursor_request( HWND hwnd, BOOL fullscreen, BOOL reset ) { - RECT clip; - if (hwnd == NtUserGetDesktopWindow()) WARN( "ignoring clip cursor request on desktop window.\n" ); else if (hwnd != NtUserGetForegroundWindow()) WARN( "ignoring clip cursor request on non-foreground window.\n" ); else if (fullscreen) clip_fullscreen_window( hwnd, reset ); - else - { - NtUserGetClipCursor( &clip ); - X11DRV_ClipCursor( &clip, FALSE ); - } - return 0; }
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=133472
Your paranoid android.
=== debian11 (32 bit report) ===
user32: input.c:858: Test failed: 0 (a4/0): 12 from 00 -> 00 instead of 00 -> 80 input.c:858: Test failed: 0 (a4/0): a4 from 00 -> 00 instead of 00 -> 80 input.c:984: Test failed: 0 (a4/0): the msg sequence is not complete: expected 0104 - actual 0000 input.c:858: Test failed: 1 (46/0): 46 from 00 -> 00 instead of 00 -> 80 input.c:984: Test failed: 1 (46/0): the msg sequence is not complete: expected 0104 - actual 0000 input.c:858: Test failed: 2 (46/2): 46 from 00 -> 00 instead of 80 -> 00 input.c:984: Test failed: 2 (46/2): the msg sequence is not complete: expected 0105 - actual 0000 input.c:858: Test failed: 3 (a4/2): 12 from 00 -> 00 instead of 80 -> 00 input.c:858: Test failed: 3 (a4/2): a4 from 00 -> 00 instead of 80 -> 00 input.c:984: Test failed: 3 (a4/2): the msg sequence is not complete: expected 0101 - actual 0000 input.c:858: Test failed: 4 (a2/0): 11 from 00 -> 00 instead of 00 -> 80 input.c:858: Test failed: 4 (a2/0): a2 from 00 -> 00 instead of 00 -> 80 input.c:984: Test failed: 4 (a2/0): the msg sequence is not complete: expected 0100 - actual 0000 input.c:858: Test failed: 5 (4f/0): 4f from 00 -> 00 instead of 00 -> 80 input.c:984: Test failed: 5 (4f/0): the msg sequence is not complete: expected 0100 - actual 0000 input.c:858: Test failed: 6 (4f/2): 4f from 00 -> 00 instead of 80 -> 00 input.c:984: Test failed: 6 (4f/2): the msg sequence is not complete: expected 0101 - actual 0000 input.c:858: Test failed: 7 (a2/2): 11 from 00 -> 00 instead of 80 -> 00 input.c:858: Test failed: 7 (a2/2): a2 from 00 -> 00 instead of 80 -> 00 input.c:984: Test failed: 7 (a2/2): the msg sequence is not complete: expected 0101 - actual 0000 input.c:858: Test failed: 8 (a4/0): 12 from 00 -> 00 instead of 00 -> 80 input.c:858: Test failed: 8 (a4/0): a4 from 00 -> 00 instead of 00 -> 80 input.c:984: Test failed: 8 (a4/0): the msg sequence is not complete: expected 0104 - actual 0000 input.c:858: Test failed: 9 (a2/0): 11 from 00 -> 00 instead of 00 -> 80 input.c:858: Test failed: 9 (a2/0): a2 from 00 -> 00 instead of 00 -> 80 input.c:984: Test failed: 9 (a2/0): the msg sequence is not complete: expected 0100 - actual 0000 input.c:858: Test failed: 10 (58/0): 58 from 00 -> 00 instead of 00 -> 80 input.c:984: Test failed: 10 (58/0): the msg sequence is not complete: expected 0100 - actual 0000 input.c:858: Test failed: 11 (58/2): 58 from 00 -> 00 instead of 80 -> 00 input.c:984: Test failed: 11 (58/2): the msg sequence is not complete: expected 0101 - actual 0000 input.c:858: Test failed: 12 (a2/2): 11 from 00 -> 00 instead of 80 -> 00 input.c:858: Test failed: 12 (a2/2): a2 from 00 -> 00 instead of 80 -> 00 input.c:984: Test failed: 12 (a2/2): the msg sequence is not complete: expected 0105 - actual 0000 input.c:858: Test failed: 13 (a4/2): 12 from 00 -> 00 instead of 80 -> 00 input.c:858: Test failed: 13 (a4/2): a4 from 00 -> 00 instead of 80 -> 00 input.c:984: Test failed: 13 (a4/2): the msg sequence is not complete: expected 0101 - actual 0000 input.c:858: Test failed: 14 (a0/0): 10 from 00 -> 00 instead of 00 -> 80 input.c:858: Test failed: 14 (a0/0): a0 from 00 -> 00 instead of 00 -> 80 input.c:984: Test failed: 14 (a0/0): the msg sequence is not complete: expected 0100 - actual 0000 input.c:858: Test failed: 15 (41/0): 41 from 00 -> 00 instead of 00 -> 80 input.c:984: Test failed: 15 (41/0): the msg sequence is not complete: expected 0100 - actual 0000 input.c:858: Test failed: 16 (41/2): 41 from 00 -> 00 instead of 80 -> 00 input.c:984: Test failed: 16 (41/2): the msg sequence is not complete: expected 0101 - actual 0000 input.c:858: Test failed: 17 (a0/2): 10 from 00 -> 00 instead of 80 -> 00 input.c:858: Test failed: 17 (a0/2): a0 from 00 -> 00 instead of 80 -> 00 input.c:984: Test failed: 17 (a0/2): the msg sequence is not complete: expected 0101 - actual 0000 input.c:858: Test failed: 18 (a1/0): 10 from 00 -> 00 instead of 00 -> 80 input.c:984: Test failed: 18 (a1/0): the msg sequence is not complete: expected 0100 - actual 0000 input.c:858: Test failed: 19 (a1/2): 10 from 00 -> 00 instead of 80 -> 00 input.c:984: Test failed: 19 (a1/2): the msg sequence is not complete: expected 0101 - actual 0000 input.c:858: Test failed: 20 (a0/1): 10 from 00 -> 00 instead of 00 -> 80 input.c:858: Test failed: 20 (a0/1): a1 from 00 -> 00 instead of 00 -> 80 input.c:984: Test failed: 20 (a0/1): the msg sequence is not complete: expected 0100 - actual 0000 input.c:858: Test failed: 21 (a0/3): 10 from 00 -> 00 instead of 80 -> 00 input.c:858: Test failed: 21 (a0/3): a1 from 00 -> 00 instead of 80 -> 00 input.c:984: Test failed: 21 (a0/3): the msg sequence is not complete: expected 0101 - actual 0000 input.c:858: Test failed: 22 (a1/1): 10 from 00 -> 00 instead of 00 -> 80 input.c:858: Test failed: 22 (a1/1): a1 from 00 -> 00 instead of 00 -> 80 input.c:984: Test failed: 22 (a1/1): the msg sequence is not complete: expected 0100 - actual 0000 input.c:858: Test failed: 23 (a1/3): 10 from 00 -> 00 instead of 80 -> 00 input.c:858: Test failed: 23 (a1/3): a1 from 00 -> 00 instead of 80 -> 00 input.c:984: Test failed: 23 (a1/3): the msg sequence is not complete: expected 0101 - actual 0000 input.c:858: Test failed: 24 (10/0): 10 from 00 -> 00 instead of 00 -> 80 input.c:858: Test failed: 24 (10/0): a0 from 00 -> 00 instead of 00 -> 80 input.c:984: Test failed: 24 (10/0): the msg sequence is not complete: expected 0100 - actual 0000 input.c:858: Test failed: 25 (10/2): 10 from 00 -> 00 instead of 80 -> 00 input.c:858: Test failed: 25 (10/2): a0 from 00 -> 00 instead of 80 -> 00 input.c:984: Test failed: 25 (10/2): the msg sequence is not complete: expected 0101 - actual 0000 input.c:858: Test failed: 26 (10/1): 10 from 00 -> 00 instead of 00 -> 80 input.c:858: Test failed: 26 (10/1): a1 from 00 -> 00 instead of 00 -> 80 input.c:984: Test failed: 26 (10/1): the msg sequence is not complete: expected 0100 - actual 0000 input.c:858: Test failed: 27 (10/3): 10 from 00 -> 00 instead of 80 -> 00 input.c:858: Test failed: 27 (10/3): a1 from 00 -> 00 instead of 80 -> 00 input.c:984: Test failed: 27 (10/3): the msg sequence is not complete: expected 0101 - actual 0000 input.c:858: Test failed: 28 (a3/0): 11 from 00 -> 00 instead of 00 -> 80 input.c:858: Test failed: 28 (a3/0): a2 from 00 -> 00 instead of 00 -> 80 input.c:984: Test failed: 28 (a3/0): the msg sequence is not complete: expected 0100 - actual 0000 input.c:858: Test failed: 29 (a3/2): 11 from 00 -> 00 instead of 80 -> 00 input.c:858: Test failed: 29 (a3/2): a2 from 00 -> 00 instead of 80 -> 00 input.c:984: Test failed: 29 (a3/2): the msg sequence is not complete: expected 0101 - actual 0000 input.c:858: Test failed: 30 (a2/1): 11 from 00 -> 00 instead of 00 -> 80 input.c:858: Test failed: 30 (a2/1): a3 from 00 -> 00 instead of 00 -> 80 input.c:984: Test failed: 30 (a2/1): the msg sequence is not complete: expected 0100 - actual 0000 input.c:858: Test failed: 31 (a2/3): 11 from 00 -> 00 instead of 80 -> 00 input.c:858: Test failed: 31 (a2/3): a3 from 00 -> 00 instead of 80 -> 00 input.c:984: Test failed: 31 (a2/3): the msg sequence is not complete: expected 0101 - actual 0000 input.c:858: Test failed: 32 (a3/1): 11 from 00 -> 00 instead of 00 -> 80 input.c:858: Test failed: 32 (a3/1): a3 from 00 -> 00 instead of 00 -> 80 input.c:984: Test failed: 32 (a3/1): the msg sequence is not complete: expected 0100 - actual 0000 input.c:858: Test failed: 33 (a3/3): 11 from 00 -> 00 instead of 80 -> 00 input.c:858: Test failed: 33 (a3/3): a3 from 00 -> 00 instead of 80 -> 00 input.c:984: Test failed: 33 (a3/3): the msg sequence is not complete: expected 0101 - actual 0000 input.c:858: Test failed: 34 (11/0): 11 from 00 -> 00 instead of 00 -> 80 input.c:858: Test failed: 34 (11/0): a2 from 00 -> 00 instead of 00 -> 80 input.c:984: Test failed: 34 (11/0): the msg sequence is not complete: expected 0100 - actual 0000 input.c:858: Test failed: 35 (11/2): 11 from 00 -> 00 instead of 80 -> 00 input.c:858: Test failed: 35 (11/2): a2 from 00 -> 00 instead of 80 -> 00 input.c:984: Test failed: 35 (11/2): the msg sequence is not complete: expected 0101 - actual 0000 input.c:858: Test failed: 36 (11/1): 11 from 00 -> 00 instead of 00 -> 80 input.c:858: Test failed: 36 (11/1): a3 from 00 -> 00 instead of 00 -> 80 input.c:984: Test failed: 36 (11/1): the msg sequence is not complete: expected 0100 - actual 0000 input.c:858: Test failed: 37 (11/3): 11 from 00 -> 00 instead of 80 -> 00 input.c:858: Test failed: 37 (11/3): a3 from 00 -> 00 instead of 80 -> 00 input.c:984: Test failed: 37 (11/3): the msg sequence is not complete: expected 0101 - actual 0000 input.c:858: Test failed: 38 (a5/0): 12 from 00 -> 00 instead of 00 -> 80 input.c:858: Test failed: 38 (a5/0): a4 from 00 -> 00 instead of 00 -> 80 input.c:984: Test failed: 38 (a5/0): the msg sequence is not complete: expected 0104 - actual 0000 input.c:858: Test failed: 40 (a4/1): 12 from 00 -> 00 instead of 00 -> 80 input.c:858: Test failed: 40 (a4/1): a5 from 00 -> 00 instead of 00 -> 80 input.c:984: Test failed: 40 (a4/1): the msg sequence is not complete: expected 0104 - actual 0000 input.c:858: Test failed: 42 (a5/1): 12 from 00 -> 00 instead of 00 -> 80 input.c:858: Test failed: 42 (a5/1): a5 from 00 -> 00 instead of 00 -> 80 input.c:984: Test failed: 42 (a5/1): the msg sequence is not complete: expected 0104 - actual 0000 input.c:858: Test failed: 44 (12/0): 12 from 00 -> 00 instead of 00 -> 80 input.c:858: Test failed: 44 (12/0): a4 from 00 -> 00 instead of 00 -> 80 input.c:984: Test failed: 44 (12/0): the msg sequence is not complete: expected 0104 - actual 0000 input.c:858: Test failed: 46 (12/1): 12 from 00 -> 00 instead of 00 -> 80 input.c:858: Test failed: 46 (12/1): a5 from 00 -> 00 instead of 00 -> 80 input.c:984: Test failed: 46 (12/1): the msg sequence is not complete: expected 0104 - actual 0000 input.c:858: Test failed: 48 (a0/0): 10 from 00 -> 00 instead of 00 -> 80 input.c:858: Test failed: 48 (a0/0): a0 from 00 -> 00 instead of 00 -> 80 input.c:984: Test failed: 48 (a0/0): the msg sequence is not complete: expected 0100 - actual 0000 input.c:858: Test failed: 49 (a1/1): a1 from 00 -> 00 instead of 00 -> 80 input.c:984: Test failed: 49 (a1/1): the msg sequence is not complete: expected 0100 - actual 0000 input.c:858: Test failed: 50 (a1/3): a1 from 00 -> 00 instead of 80 -> 00 input.c:858: Test failed: 51 (a0/2): 10 from 00 -> 00 instead of 80 -> 00 input.c:858: Test failed: 51 (a0/2): a0 from 00 -> 00 instead of 80 -> 00 input.c:984: Test failed: 51 (a0/2): the msg sequence is not complete: expected 0101 - actual 0000 input.c:1165: Test failed: Last keyup msg should have been VK_PACKET[0x00e7] (was: 0xffffffff) input.c:1191: Test failed: Last syskeydown msg should have been VK_PACKET[0x00e7] (was: 0xffffffff) input.c:1193: Test failed: Last syschar msg should have been 0x3041 (was: 0xffffffff) input.c:1218: Test failed: Last keyup msg should have been VK_PACKET[0x00e7] (was: 0xffffffff) input.c:1244: Test failed: Unexpected key down 0xffffffff. input.c:1245: Test failed: Unexpected key up 0xffffffff. input.c:3872: Test failed: expected WM_LBUTTONDOWN message input.c:3873: Test failed: expected WM_LBUTTONUP message input.c:3901: Test failed: expected WM_RBUTTONDOWN message input.c:3902: Test failed: expected WM_RBUTTONUP message input.c:4021: Test failed: expected WM_RBUTTONDOWN message input.c:4022: Test failed: expected WM_RBUTTONUP message input.c:4049: Test failed: expected WM_LBUTTONDOWN message input.c:4050: Test failed: expected WM_LBUTTONUP message menu.c:2324: Test failed: test 20 menu.c:2324: Test failed: test 22 menu.c:2324: Test failed: test 24 msg.c:18499: Test failed: window hotkey press LWIN: 1: the msg sequence is not complete: expected 0100 - actual 0000 msg.c:18529: Test failed: window hotkey release LWIN: 1: the msg sequence is not complete: expected 0101 - actual 0000 msg.c:18557: Test failed: window hotkey combined: 7: the msg sequence is not complete: expected 0100 - actual 0000 msg.c:18571: Test failed: window hotkey previous: 4: the msg sequence is not complete: expected 0100 - actual 0000 msg.c:18586: Test failed: window hotkey new: 3: the msg sequence is not complete: expected 0101 - actual 0000 msg.c:18610: Test failed: thread hotkey press LWIN: 1: the msg sequence is not complete: expected 0100 - actual 0000 msg.c:18647: Test failed: thread hotkey release LWIN: 1: the msg sequence is not complete: expected 0101 - actual 0000 msg.c:18697: Test failed: window hotkey release ALT: 1: the msg sequence is not complete: expected 0101 - actual 0000 win.c:10269: Test failed: button under static window didn't get WM_LBUTTONUP
v2: Merge hardware WM_WINE_CLIPCURSOR messages together.
This should solve the ddraw test timeout, caused by many messages being queued and the application only processing them from time to time.