Alexandre Julliard : server: Reset the cursor clip rectangle when the foreground thread changes.
Alexandre Julliard
julliard at winehq.org
Wed Mar 30 13:15:37 CDT 2011
Module: wine
Branch: master
Commit: 2b96875b6af708895006570b74b6254d7ac9b34e
URL: http://source.winehq.org/git/wine.git/?a=commit;h=2b96875b6af708895006570b74b6254d7ac9b34e
Author: Alexandre Julliard <julliard at winehq.org>
Date: Wed Mar 30 12:34:32 2011 +0200
server: Reset the cursor clip rectangle when the foreground thread changes.
---
server/queue.c | 12 ++++++++++--
1 files changed, 10 insertions(+), 2 deletions(-)
diff --git a/server/queue.c b/server/queue.c
index 7d25afa..2e1168d 100644
--- a/server/queue.c
+++ b/server/queue.c
@@ -318,6 +318,14 @@ static int assign_thread_input( struct thread *thread, struct thread_input *new_
return 1;
}
+/* change the foreground input and reset the cursor clip rect */
+static void set_foreground_input( struct desktop *desktop, struct thread_input *input )
+{
+ if (desktop->foreground_input == input) return;
+ get_top_window_rectangle( desktop, &desktop->cursor_clip );
+ desktop->foreground_input = input;
+}
+
/* get the hook table for a given thread */
struct hook_table *get_queue_hooks( struct thread *thread )
{
@@ -901,7 +909,7 @@ static void thread_input_destroy( struct object *obj )
empty_msg_list( &input->msg_list );
if (input->desktop)
{
- if (input->desktop->foreground_input == input) input->desktop->foreground_input = NULL;
+ if (input->desktop->foreground_input == input) set_foreground_input( input->desktop, NULL );
release_object( input->desktop );
}
}
@@ -2445,7 +2453,7 @@ DECL_HANDLER(set_foreground_window)
((thread = get_window_thread( req->handle ))) &&
(thread->queue->input->desktop == desktop))
{
- desktop->foreground_input = thread->queue->input;
+ set_foreground_input( desktop, thread->queue->input );
reply->send_msg_new = (desktop->foreground_input != queue->input);
}
else set_win32_error( ERROR_INVALID_WINDOW_HANDLE );
More information about the wine-cvs
mailing list