Jacek Caban : user32: Use NtUserGetGUIThreadInfo for GetCapture implementation.
Alexandre Julliard
julliard at winehq.org
Fri Mar 11 14:49:10 CST 2022
Module: wine
Branch: master
Commit: 5deb0412f6292b24eb7fbdae4875b197932d4277
URL: https://source.winehq.org/git/wine.git/?a=commit;h=5deb0412f6292b24eb7fbdae4875b197932d4277
Author: Jacek Caban <jacek at codeweavers.com>
Date: Fri Mar 11 14:22:29 2022 +0100
user32: Use NtUserGetGUIThreadInfo for GetCapture implementation.
Signed-off-by: Jacek Caban <jacek at codeweavers.com>
Signed-off-by: Huw Davies <huw at codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard at winehq.org>
---
dlls/user32/input.c | 12 +++---------
1 file changed, 3 insertions(+), 9 deletions(-)
diff --git a/dlls/user32/input.c b/dlls/user32/input.c
index 6cf60abeae2..51df6d8a40f 100644
--- a/dlls/user32/input.c
+++ b/dlls/user32/input.c
@@ -338,15 +338,9 @@ BOOL WINAPI DECLSPEC_HOTPATCH ReleaseCapture(void)
*/
HWND WINAPI GetCapture(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->capture );
- }
- SERVER_END_REQ;
- return ret;
+ GUITHREADINFO info;
+ info.cbSize = sizeof(info);
+ return NtUserGetGUIThreadInfo( GetCurrentThreadId(), &info ) ? info.hwndCapture : 0;
}
More information about the wine-cvs
mailing list