Module: wine Branch: master Commit: 88cbc08b7fcb90c6048f5868c82e3c2165dcc1cd URL: https://gitlab.winehq.org/wine/wine/-/commit/88cbc08b7fcb90c6048f5868c82e3c2...
Author: Rémi Bernon rbernon@codeweavers.com Date: Wed May 31 11:11:10 2023 +0200
server: Don't reset cursor clipping on foreground thread exit.
It will be reset on foreground input changes, when it happens.
---
dlls/user32/tests/input.c | 2 -- server/queue.c | 7 ++++--- 2 files changed, 4 insertions(+), 5 deletions(-)
diff --git a/dlls/user32/tests/input.c b/dlls/user32/tests/input.c index 197a82db251..2ce129dae45 100644 --- a/dlls/user32/tests/input.c +++ b/dlls/user32/tests/input.c @@ -5282,7 +5282,6 @@ static void test_ClipCursor_process(void) InflateRect( &clip_rect, +1, +1 ); ok_ret( 1, DestroyWindow( hwnd ) ); ok_ret( 1, GetClipCursor( &rect ) ); - todo_wine ok_rect( clip_rect, rect );
/* intentionally leaking clipping rect */ @@ -5339,7 +5338,6 @@ static void test_ClipCursor_desktop( char **argv ) /* as foreground window is now transient, cursor clipping isn't reset */ InflateRect( &clip_rect, +1, +1 ); ok_ret( 1, GetClipCursor( &rect ) ); - todo_wine ok_rect( clip_rect, rect );
/* intentionally leaking clipping rect */ diff --git a/server/queue.c b/server/queue.c index e27727a3173..0c7d2c50a49 100644 --- a/server/queue.c +++ b/server/queue.c @@ -1093,12 +1093,13 @@ static void thread_input_dump( struct object *obj, int verbose ) static void thread_input_destroy( struct object *obj ) { struct thread_input *input = (struct thread_input *)obj; + struct desktop *desktop;
empty_msg_list( &input->msg_list ); - if (input->desktop) + if ((desktop = input->desktop)) { - if (input->desktop->foreground_input == input) set_foreground_input( input->desktop, NULL ); - release_object( input->desktop ); + if (desktop->foreground_input == input) desktop->foreground_input = NULL; + release_object( desktop ); } }