From ab45fed26af328aa32708ba1cbfe6e463af59073 Mon Sep 17 00:00:00 2001 From: Jacek Caban Date: Thu, 24 Feb 2022 01:28:44 +0100 Subject: [PATCH] user32: Use NtUserGetGUIThreadInfo in GetFocus. Signed-off-by: Jacek Caban Signed-off-by: Huw Davies Signed-off-by: Alexandre Julliard --- dlls/user32/focus.c | 12 +++--------- 1 file changed, 3 insertions(+), 9 deletions(-) diff --git a/dlls/user32/focus.c b/dlls/user32/focus.c index 42787bac60a..f0b5ea2552e 100644 --- a/dlls/user32/focus.c +++ b/dlls/user32/focus.c @@ -353,15 +353,9 @@ HWND WINAPI GetActiveWindow(void) */ HWND WINAPI GetFocus(void) { - HWND ret = 0; - - SERVER_START_REQ( get_thread_input ) - { - req->tid = GetCurrentThreadId(); - if (!wine_server_call_err( req )) ret = wine_server_ptr_handle( reply->focus ); - } - SERVER_END_REQ; - return ret; + GUITHREADINFO info; + info.cbSize = sizeof(info); + return NtUserGetGUIThreadInfo( GetCurrentThreadId(), &info ) ? info.hwndFocus : 0; }