Module: wine Branch: master Commit: 3e94864540fd1cd7dbd71f48a4c5e81a915357c0 URL: https://source.winehq.org/git/wine.git/?a=commit;h=3e94864540fd1cd7dbd71f48a...
Author: Jacek Caban jacek@codeweavers.com Date: Tue Apr 19 15:31:17 2022 +0200
winex11: Use NtUserGetThreadInfo to access thread data.
Signed-off-by: Jacek Caban jacek@codeweavers.com Signed-off-by: Huw Davies huw@codeweavers.com Signed-off-by: Alexandre Julliard julliard@winehq.org
---
dlls/win32u/sysparams.c | 3 --- dlls/winex11.drv/event.c | 2 +- dlls/winex11.drv/mouse.c | 2 +- include/ntuser.h | 6 ------ 4 files changed, 2 insertions(+), 11 deletions(-)
diff --git a/dlls/win32u/sysparams.c b/dlls/win32u/sysparams.c index 535f3bdb95b..32da544c157 100644 --- a/dlls/win32u/sysparams.c +++ b/dlls/win32u/sysparams.c @@ -4638,9 +4638,6 @@ ULONG_PTR WINAPI NtUserCallNoParam( ULONG code ) case NtUserCallNoParam_GetInputState: return get_input_state();
- case NtUserCallNoParam_GetMessagePos: - return NtUserGetThreadInfo()->message_pos; - case NtUserCallNoParam_ReleaseCapture: return release_capture();
diff --git a/dlls/winex11.drv/event.c b/dlls/winex11.drv/event.c index 147865e7af6..7ac31e326c6 100644 --- a/dlls/winex11.drv/event.c +++ b/dlls/winex11.drv/event.c @@ -572,7 +572,7 @@ static void set_input_focus( struct x11drv_win_data *data ) if (EVENT_x11_time_to_win32_time(0)) /* ICCCM says don't use CurrentTime, so try to use last message time if possible */ /* FIXME: this is not entirely correct */ - timestamp = GetMessageTime() - EVENT_x11_time_to_win32_time(0); + timestamp = NtUserGetThreadInfo()->message_time - EVENT_x11_time_to_win32_time(0); else timestamp = CurrentTime;
diff --git a/dlls/winex11.drv/mouse.c b/dlls/winex11.drv/mouse.c index 3a6b9855ab0..82d3e17a0d1 100644 --- a/dlls/winex11.drv/mouse.c +++ b/dlls/winex11.drv/mouse.c @@ -1617,7 +1617,7 @@ void move_resize_window( HWND hwnd, int dir )
if (!(win = X11DRV_get_whole_window( hwnd ))) return;
- pt = NtUserGetMessagePos(); + pt = NtUserGetThreadInfo()->message_pos; pos = virtual_screen_to_root( (short)LOWORD( pt ), (short)HIWORD( pt ) );
if (NtUserGetKeyState( VK_LBUTTON ) & 0x8000) button = 1; diff --git a/include/ntuser.h b/include/ntuser.h index 2f1f9893ea9..e391940d63e 100644 --- a/include/ntuser.h +++ b/include/ntuser.h @@ -596,7 +596,6 @@ enum { NtUserCallNoParam_GetDesktopWindow, NtUserCallNoParam_GetInputState, - NtUserCallNoParam_GetMessagePos, NtUserCallNoParam_ReleaseCapture, /* temporary exports */ NtUserExitingThread, @@ -614,11 +613,6 @@ static inline BOOL NtUserGetInputState(void) return NtUserCallNoParam( NtUserCallNoParam_GetInputState ); }
-static inline DWORD NtUserGetMessagePos(void) -{ - return NtUserCallNoParam( NtUserCallNoParam_GetMessagePos ); -} - static inline BOOL NtUserReleaseCapture(void) { return NtUserCallNoParam( NtUserCallNoParam_ReleaseCapture );