Module: wine Branch: master Commit: 96a24135be3fd0e1239846152f72de6ee6be669f URL: https://gitlab.winehq.org/wine/wine/-/commit/96a24135be3fd0e1239846152f72de6...
Author: Rémi Bernon rbernon@codeweavers.com Date: Fri Jun 21 20:50:22 2024 +0200
win32u: Remove now unnecessary thread info active_hooks cache.
---
dlls/win32u/hook.c | 9 --------- dlls/win32u/message.c | 1 - dlls/win32u/ntuser_private.h | 1 - 3 files changed, 11 deletions(-)
diff --git a/dlls/win32u/hook.c b/dlls/win32u/hook.c index 3e2798b8c75..d47aed4c6d6 100644 --- a/dlls/win32u/hook.c +++ b/dlls/win32u/hook.c @@ -135,7 +135,6 @@ HHOOK WINAPI NtUserSetWindowsHookEx( HINSTANCE inst, UNICODE_STRING *module, DWO if (!wine_server_call_err( req )) { handle = wine_server_ptr_handle( reply->handle ); - get_user_thread_info()->active_hooks = reply->active_hooks; } } SERVER_END_REQ; @@ -156,7 +155,6 @@ BOOL WINAPI NtUserUnhookWindowsHookEx( HHOOK handle ) req->handle = wine_server_user_handle( handle ); req->id = 0; status = wine_server_call_err( req ); - if (!status) get_user_thread_info()->active_hooks = reply->active_hooks; } SERVER_END_REQ; if (status == STATUS_INVALID_HANDLE) RtlSetLastWin32Error( ERROR_INVALID_HOOK_HANDLE ); @@ -176,7 +174,6 @@ BOOL unhook_windows_hook( INT id, HOOKPROC proc ) req->id = id; req->proc = wine_server_client_ptr( proc ); status = wine_server_call_err( req ); - if (!status) get_user_thread_info()->active_hooks = reply->active_hooks; } SERVER_END_REQ; if (status == STATUS_INVALID_HANDLE) RtlSetLastWin32Error( ERROR_INVALID_HOOK_HANDLE ); @@ -427,7 +424,6 @@ LRESULT call_current_hook( HHOOK hhook, INT code, WPARAM wparam, LPARAM lparam ) LRESULT call_message_hooks( INT id, INT code, WPARAM wparam, LPARAM lparam, size_t lparam_size, size_t message_size, BOOL ansi ) { - struct user_thread_info *thread_info = get_user_thread_info(); struct win_hook_params info; WCHAR module[MAX_PATH]; DWORD_PTR ret; @@ -457,7 +453,6 @@ LRESULT call_message_hooks( INT id, INT code, WPARAM wparam, LPARAM lparam, size info.tid = reply->tid; info.proc = wine_server_get_ptr( reply->proc ); info.next_unicode = reply->unicode; - thread_info->active_hooks = reply->active_hooks; } } SERVER_END_REQ; @@ -525,7 +520,6 @@ HWINEVENTHOOK WINAPI NtUserSetWinEventHook( DWORD event_min, DWORD event_max, HM if (!wine_server_call_err( req )) { handle = wine_server_ptr_handle( reply->handle ); - get_user_thread_info()->active_hooks = reply->active_hooks; } } SERVER_END_REQ; @@ -546,7 +540,6 @@ BOOL WINAPI NtUserUnhookWinEvent( HWINEVENTHOOK handle ) req->handle = wine_server_user_handle( handle ); req->id = WH_WINEVENT; ret = !wine_server_call_err( req ); - if (ret) get_user_thread_info()->active_hooks = reply->active_hooks; } SERVER_END_REQ; return ret; @@ -557,7 +550,6 @@ BOOL WINAPI NtUserUnhookWinEvent( HWINEVENTHOOK handle ) */ void WINAPI NtUserNotifyWinEvent( DWORD event, HWND hwnd, LONG object_id, LONG child_id ) { - struct user_thread_info *thread_info = get_user_thread_info(); struct win_event_hook_params info; void *ret_ptr; ULONG ret_len; @@ -599,7 +591,6 @@ void WINAPI NtUserNotifyWinEvent( DWORD event, HWND hwnd, LONG object_id, LONG c info.module[wine_server_reply_size(req) / sizeof(WCHAR)] = 0; info.handle = wine_server_ptr_handle( reply->handle ); info.proc = wine_server_get_ptr( reply->proc ); - thread_info->active_hooks = reply->active_hooks; } } SERVER_END_REQ; diff --git a/dlls/win32u/message.c b/dlls/win32u/message.c index 941af31701f..3099f5a6660 100644 --- a/dlls/win32u/message.c +++ b/dlls/win32u/message.c @@ -2698,7 +2698,6 @@ int peek_message( MSG *msg, const struct peek_message_filter *filter ) info.msg.pt.x = reply->x; info.msg.pt.y = reply->y; hw_id = 0; - thread_info->active_hooks = reply->active_hooks; } else buffer_size = reply->total; } diff --git a/dlls/win32u/ntuser_private.h b/dlls/win32u/ntuser_private.h index d95ea03d45f..44edadad8f8 100644 --- a/dlls/win32u/ntuser_private.h +++ b/dlls/win32u/ntuser_private.h @@ -114,7 +114,6 @@ struct user_thread_info WORD hook_call_depth; /* Number of recursively called hook procs */ WORD hook_unicode; /* Is current hook unicode? */ HHOOK hook; /* Current hook */ - UINT active_hooks; /* Bitmap of active hooks */ struct received_message_info *receive_info; /* Message being currently received */ struct imm_thread_data *imm_thread_data; /* IMM thread data */ HKL kbd_layout; /* Current keyboard layout */