Module: wine Branch: master Commit: 592abf33796b8ca96d2416329e1248a774113b77 URL: https://gitlab.winehq.org/wine/wine/-/commit/592abf33796b8ca96d2416329e1248a...
Author: Jacek Caban jacek@codeweavers.com Date: Fri Dec 9 12:51:15 2022 +0100
win32u: Move GetProgmanWindow implementation from user32.
---
dlls/user32/focus.c | 11 +---------- dlls/win32u/input.c | 14 ++++++++++++++ dlls/win32u/sysparams.c | 3 +++ dlls/win32u/win32u_private.h | 1 + include/ntuser.h | 6 ++++++ 5 files changed, 25 insertions(+), 10 deletions(-)
diff --git a/dlls/user32/focus.c b/dlls/user32/focus.c index 4d18c49214e..18084f7dbfd 100644 --- a/dlls/user32/focus.c +++ b/dlls/user32/focus.c @@ -87,16 +87,7 @@ HWND WINAPI SetProgmanWindow( HWND hwnd ) */ HWND WINAPI GetProgmanWindow(void) { - HWND ret = 0; - - SERVER_START_REQ(set_global_windows) - { - req->flags = 0; - if (!wine_server_call_err(req)) - ret = wine_server_ptr_handle( reply->old_progman_window ); - } - SERVER_END_REQ; - return ret; + return NtUserGetProgmanWindow(); }
diff --git a/dlls/win32u/input.c b/dlls/win32u/input.c index 783db67031a..6d727a934c8 100644 --- a/dlls/win32u/input.c +++ b/dlls/win32u/input.c @@ -2208,6 +2208,20 @@ BOOL WINAPI NtUserSetShellWindowEx( HWND shell, HWND list_view ) return ret; }
+HWND get_progman_window(void) +{ + HWND ret = 0; + + SERVER_START_REQ(set_global_windows) + { + req->flags = 0; + if (!wine_server_call_err(req)) + ret = wine_server_ptr_handle( reply->old_progman_window ); + } + SERVER_END_REQ; + return ret; +} + HWND set_progman_window( HWND hwnd ) { SERVER_START_REQ(set_global_windows) diff --git a/dlls/win32u/sysparams.c b/dlls/win32u/sysparams.c index 89be3bbc6ed..1bd90d85332 100644 --- a/dlls/win32u/sysparams.c +++ b/dlls/win32u/sysparams.c @@ -5437,6 +5437,9 @@ ULONG_PTR WINAPI NtUserCallNoParam( ULONG code ) case NtUserCallNoParam_GetProcessDefaultLayout: return process_layout;
+ case NtUserCallNoParam_GetProgmanWindow: + return HandleToUlong( get_progman_window() ); + case NtUserCallNoParam_GetShellWindow: return HandleToUlong( get_shell_window() );
diff --git a/dlls/win32u/win32u_private.h b/dlls/win32u/win32u_private.h index fd29423cec5..67efa7ddefc 100644 --- a/dlls/win32u/win32u_private.h +++ b/dlls/win32u/win32u_private.h @@ -271,6 +271,7 @@ extern HWND get_capture(void) DECLSPEC_HIDDEN; extern BOOL get_cursor_pos( POINT *pt ) DECLSPEC_HIDDEN; extern HWND get_focus(void) DECLSPEC_HIDDEN; extern DWORD get_input_state(void) DECLSPEC_HIDDEN; +extern HWND get_progman_window(void) DECLSPEC_HIDDEN; extern HWND get_shell_window(void) DECLSPEC_HIDDEN; extern BOOL WINAPI release_capture(void) DECLSPEC_HIDDEN; extern BOOL set_capture_window( HWND hwnd, UINT gui_flags, HWND *prev_ret ) DECLSPEC_HIDDEN; diff --git a/include/ntuser.h b/include/ntuser.h index 19e8443475d..3fc0bc71cd4 100644 --- a/include/ntuser.h +++ b/include/ntuser.h @@ -911,6 +911,7 @@ enum NtUserCallNoParam_GetDialogBaseUnits, NtUserCallNoParam_GetInputState, NtUserCallNoParam_GetProcessDefaultLayout, + NtUserCallNoParam_GetProgmanWindow, NtUserCallNoParam_GetShellWindow, NtUserCallNoParam_ReleaseCapture, /* temporary exports */ @@ -943,6 +944,11 @@ static inline DWORD NtUserGetProcessDefaultLayout(void) return NtUserCallNoParam( NtUserCallNoParam_GetProcessDefaultLayout ); }
+static inline HWND NtUserGetProgmanWindow(void) +{ + return UlongToHandle( NtUserCallNoParam( NtUserCallNoParam_GetProgmanWindow )); +} + static inline HWND NtUserGetShellWindow(void) { return UlongToHandle( NtUserCallNoParam( NtUserCallNoParam_GetShellWindow ));