user32: Use NtUserGetGUIThreadInfo in GetFocus.

Signed-off-by: Jacek Caban <jacek@codeweavers.com>
Signed-off-by: Huw Davies <huw@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
This commit is contained in:
Jacek Caban 2022-02-24 01:28:44 +01:00 committed by Alexandre Julliard
parent fa2f52578b
commit ab45fed26a
1 changed files with 3 additions and 9 deletions

View File

@ -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;
}