Jacek Caban : win32u: Use public declaration for NtUserPostMessage.

Alexandre Julliard julliard at winehq.org
Tue Apr 5 15:39:44 CDT 2022


Module: wine
Branch: master
Commit: dca49630a9caf34c85a576428a16f4091ac33ac8
URL:    https://source.winehq.org/git/wine.git/?a=commit;h=dca49630a9caf34c85a576428a16f4091ac33ac8

Author: Jacek Caban <jacek at codeweavers.com>
Date:   Mon Apr  4 16:57:31 2022 +0200

win32u: Use public declaration for NtUserPostMessage.

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/win32u/input.c          | 2 +-
 dlls/win32u/message.c        | 6 ++++--
 dlls/win32u/win32u_private.h | 1 -
 dlls/win32u/window.c         | 4 ++--
 include/ntuser.h             | 2 ++
 5 files changed, 9 insertions(+), 6 deletions(-)

diff --git a/dlls/win32u/input.c b/dlls/win32u/input.c
index 9f309ed37ec..7fd9e7da720 100644
--- a/dlls/win32u/input.c
+++ b/dlls/win32u/input.c
@@ -1394,7 +1394,7 @@ static BOOL set_active_window( HWND hwnd, HWND *prev, BOOL mouse, BOOL focus )
                       MAKEWPARAM( mouse ? WA_CLICKACTIVE : WA_ACTIVE, is_iconic(hwnd) ),
                       (LPARAM)previous );
         if (NtUserGetAncestor( hwnd, GA_PARENT ) == get_desktop_window())
-            post_message( get_desktop_window(), WM_PARENTNOTIFY, WM_NCACTIVATE, (LPARAM)hwnd );
+            NtUserPostMessage( get_desktop_window(), WM_PARENTNOTIFY, WM_NCACTIVATE, (LPARAM)hwnd );
     }
 
     /* now change focus if necessary */
diff --git a/dlls/win32u/message.c b/dlls/win32u/message.c
index 0f84ad055e7..639372cc7c1 100644
--- a/dlls/win32u/message.c
+++ b/dlls/win32u/message.c
@@ -2154,8 +2154,10 @@ static BOOL send_notify_message( HWND hwnd, UINT msg, WPARAM wparam, LPARAM lpar
     return user_callbacks && user_callbacks->pSendNotifyMessageW( hwnd, msg, wparam, lparam );
 }
 
-/* see PostMessageW */
-LRESULT post_message( HWND hwnd, UINT msg, WPARAM wparam, LPARAM lparam )
+/***********************************************************************
+ *           NtUserPostMessage  (win32u.@)
+ */
+BOOL WINAPI NtUserPostMessage( HWND hwnd, UINT msg, WPARAM wparam, LPARAM lparam )
 {
     /* FIXME: move implementation from user32 */
     if (!user_callbacks) return 0;
diff --git a/dlls/win32u/win32u_private.h b/dlls/win32u/win32u_private.h
index 350372b0ed7..d72ce3b8a0d 100644
--- a/dlls/win32u/win32u_private.h
+++ b/dlls/win32u/win32u_private.h
@@ -350,7 +350,6 @@ extern HMENU get_menu( HWND hwnd ) DECLSPEC_HIDDEN;
 /* message.c */
 extern LRESULT dispatch_message( const MSG *msg, BOOL ansi ) DECLSPEC_HIDDEN;
 extern BOOL kill_system_timer( HWND hwnd, UINT_PTR id ) DECLSPEC_HIDDEN;
-extern LRESULT post_message( HWND hwnd, UINT msg, WPARAM wparam, LPARAM lparam ) DECLSPEC_HIDDEN;
 extern void process_sent_messages(void) DECLSPEC_HIDDEN;
 extern BOOL reply_message_result( LRESULT result, MSG *msg ) DECLSPEC_HIDDEN;
 extern NTSTATUS send_hardware_message( HWND hwnd, const INPUT *input, const RAWINPUT *rawinput,
diff --git a/dlls/win32u/window.c b/dlls/win32u/window.c
index 09f3fc01e58..a8be22ab51b 100644
--- a/dlls/win32u/window.c
+++ b/dlls/win32u/window.c
@@ -3902,7 +3902,7 @@ void update_window_state( HWND hwnd )
 
     if (!is_current_thread_window( hwnd ))
     {
-        post_message( hwnd, WM_WINE_UPDATEWINDOWSTATE, 0, 0 );
+        NtUserPostMessage( hwnd, WM_WINE_UPDATEWINDOWSTATE, 0, 0 );
         return;
     }
 
@@ -4923,7 +4923,7 @@ HWND WINAPI NtUserCreateWindowEx( DWORD ex_style, UNICODE_STRING *class_name,
     }
 
     if (parent == get_desktop_window())
-        post_message( parent, WM_PARENTNOTIFY, WM_CREATE, (LPARAM)hwnd );
+        NtUserPostMessage( parent, WM_PARENTNOTIFY, WM_CREATE, (LPARAM)hwnd );
 
     if (cs.style & WS_VISIBLE)
     {
diff --git a/include/ntuser.h b/include/ntuser.h
index 4515a9ce0f1..0be02986377 100644
--- a/include/ntuser.h
+++ b/include/ntuser.h
@@ -608,6 +608,8 @@ BOOL    WINAPI NtUserSetObjectInformation( HANDLE handle, INT index, void *info,
 HDESK   WINAPI NtUserOpenDesktop( OBJECT_ATTRIBUTES *attr, DWORD flags, ACCESS_MASK access );
 HDESK   WINAPI NtUserOpenInputDesktop( DWORD flags, BOOL inherit, ACCESS_MASK access );
 BOOL    WINAPI NtUserPeekMessage( MSG *msg_out, HWND hwnd, UINT first, UINT last, UINT flags );
+BOOL    WINAPI NtUserPostMessage( HWND hwnd, UINT msg, WPARAM wparam, LPARAM lparam );
+BOOL    WINAPI NtUserPostThreadMessage( DWORD thread, UINT msg, WPARAM wparam, LPARAM lparam );
 BOOL    WINAPI NtUserRedrawWindow( HWND hwnd, const RECT *rect, HRGN hrgn, UINT flags );
 ATOM    WINAPI NtUserRegisterClassExWOW( const WNDCLASSEXW *wc, UNICODE_STRING *name, UNICODE_STRING *version,
                                          struct client_menu_name *client_menu_name, DWORD fnid, DWORD flags,




More information about the wine-cvs mailing list