From: Rémi Bernon rbernon@codeweavers.com
--- server/hook.c | 6 +++--- server/protocol.def | 4 ---- server/queue.c | 9 +++------ server/user.h | 2 +- 4 files changed, 7 insertions(+), 14 deletions(-)
diff --git a/server/hook.c b/server/hook.c index aff3a5b12b6..37d3427108d 100644 --- a/server/hook.c +++ b/server/hook.c @@ -463,7 +463,7 @@ DECL_HANDLER(set_hook) hook->module = module; hook->module_size = module_size; reply->handle = hook->handle; - reply->active_hooks = set_queue_active_hooks( current ); + set_queue_active_hooks( current ); } else free( module );
@@ -501,7 +501,7 @@ DECL_HANDLER(remove_hook) } } remove_hook( hook ); - reply->active_hooks = set_queue_active_hooks( current ); + set_queue_active_hooks( current ); }
@@ -518,7 +518,7 @@ DECL_HANDLER(start_hook_chain) return; }
- reply->active_hooks = set_queue_active_hooks( current ); + set_queue_active_hooks( current );
if (!table || !(hook = get_first_valid_hook( table, req->id - WH_MINHOOK, req->event, req->window, req->object_id, req->child_id ))) diff --git a/server/protocol.def b/server/protocol.def index c20137a05f1..1ed11f0c4fe 100644 --- a/server/protocol.def +++ b/server/protocol.def @@ -2225,7 +2225,6 @@ enum message_type int x; /* message x position */ int y; /* message y position */ unsigned int time; /* message time */ - unsigned int active_hooks; /* active hooks bitmap */ data_size_t total; /* total size of extra data */ VARARG(data,message_data); /* message data for sent messages */ @END @@ -3029,7 +3028,6 @@ enum caret_state VARARG(module,unicode_str); /* module name */ @REPLY user_handle_t handle; /* handle to the hook */ - unsigned int active_hooks; /* active hooks bitmap */ @END
@@ -3039,7 +3037,6 @@ enum caret_state client_ptr_t proc; /* hook procedure if handle is 0 */ int id; /* id of the hook if handle is 0 */ @REPLY - unsigned int active_hooks; /* active hooks bitmap */ @END
@@ -3056,7 +3053,6 @@ enum caret_state thread_id_t tid; /* thread id for low-level keyboard/mouse hooks */ int unicode; /* is it a unicode hook? */ client_ptr_t proc; /* hook procedure */ - unsigned int active_hooks; /* active hooks bitmap */ VARARG(module,unicode_str); /* module name */ @END
diff --git a/server/queue.c b/server/queue.c index cd6ab1bccdc..1a27ee9c21f 100644 --- a/server/queue.c +++ b/server/queue.c @@ -633,20 +633,17 @@ void set_queue_hooks( struct thread *thread, struct hook_table *hooks ) }
/* update the thread message queue active hooks bitmap */ -unsigned int set_queue_active_hooks( struct thread *thread ) +void set_queue_active_hooks( struct thread *thread ) { - unsigned int active_hooks = get_active_hooks(); - if (thread->queue) { + unsigned int active_hooks = get_active_hooks(); SHARED_WRITE_BEGIN( thread->queue->shared, queue_shm_t ) { shared->active_hooks = active_hooks; } SHARED_WRITE_END; } - - return active_hooks; }
/* check the queue status */ @@ -3110,7 +3107,7 @@ DECL_HANDLER(get_message) user_handle_t get_win = get_user_full_handle( req->get_win ); unsigned int filter = req->flags >> 16;
- reply->active_hooks = set_queue_active_hooks( current ); + set_queue_active_hooks( current );
if (get_win && get_win != 1 && get_win != -1 && !get_user_object( get_win, USER_WINDOW )) { diff --git a/server/user.h b/server/user.h index 3d7dcce6e13..618830e0bb0 100644 --- a/server/user.h +++ b/server/user.h @@ -114,7 +114,7 @@ extern struct thread *get_first_global_hook( struct desktop *desktop, int id ); extern void free_msg_queue( struct thread *thread ); extern struct hook_table *get_queue_hooks( struct thread *thread ); extern void set_queue_hooks( struct thread *thread, struct hook_table *hooks ); -extern unsigned int set_queue_active_hooks( struct thread *thread ); +extern void set_queue_active_hooks( struct thread *thread ); extern void inc_queue_paint_count( struct thread *thread, int incr ); extern void queue_cleanup_window( struct thread *thread, user_handle_t win ); extern int init_thread_queue( struct thread *thread );