server: Pass desktop to get_first_global_hook.

This commit is contained in:
Alexandros Frantzis 2024-05-29 10:34:54 +03:00 committed by Alexandre Julliard
parent f802040113
commit bf1da68aaa
3 changed files with 4 additions and 4 deletions

View file

@ -372,10 +372,10 @@ unsigned int get_active_hooks(void)
} }
/* return the thread that owns the first global hook */ /* return the thread that owns the first global hook */
struct thread *get_first_global_hook( int id ) struct thread *get_first_global_hook( struct desktop *desktop, int id )
{ {
struct hook *hook; struct hook *hook;
struct hook_table *global_hooks = get_global_hooks( current ); struct hook_table *global_hooks = desktop->global_hooks;
if (!global_hooks) return NULL; if (!global_hooks) return NULL;
if (!(hook = get_first_valid_hook( global_hooks, id - WH_MINHOOK, EVENT_MIN, 0, 0, 0 ))) return NULL; if (!(hook = get_first_valid_hook( global_hooks, id - WH_MINHOOK, EVENT_MIN, 0, 0, 0 ))) return NULL;

View file

@ -1751,7 +1751,7 @@ static int send_hook_ll_message( struct desktop *desktop, struct message *hardwa
struct message *msg; struct message *msg;
timeout_t timeout = 2000 * -10000; /* FIXME: load from registry */ timeout_t timeout = 2000 * -10000; /* FIXME: load from registry */
if (!(hook_thread = get_first_global_hook( id ))) return 0; if (!(hook_thread = get_first_global_hook( desktop, id ))) return 0;
if (!(queue = hook_thread->queue)) return 0; if (!(queue = hook_thread->queue)) return 0;
if (is_queue_hung( queue )) return 0; if (is_queue_hung( queue )) return 0;

View file

@ -103,7 +103,7 @@ extern void cleanup_clipboard_thread( struct thread *thread );
extern void remove_thread_hooks( struct thread *thread ); extern void remove_thread_hooks( struct thread *thread );
extern unsigned int get_active_hooks(void); extern unsigned int get_active_hooks(void);
extern struct thread *get_first_global_hook( int id ); extern struct thread *get_first_global_hook( struct desktop *desktop, int id );
/* queue functions */ /* queue functions */