Vincent Povirk : user32: Handle undocumented WM_POPUPSYSTEMMENU message.
Alexandre Julliard
julliard at winehq.org
Wed Sep 24 08:48:42 CDT 2008
Module: wine
Branch: master
Commit: a2742978d088c2813f2d594c9b01435cf43fca96
URL: http://source.winehq.org/git/wine.git/?a=commit;h=a2742978d088c2813f2d594c9b01435cf43fca96
Author: Vincent Povirk <vincent at codeweavers.com>
Date: Thu Aug 28 14:32:41 2008 -0500
user32: Handle undocumented WM_POPUPSYSTEMMENU message.
---
dlls/user32/defwnd.c | 12 ++++++++++++
dlls/user32/spy.c | 3 ++-
dlls/user32/user_private.h | 1 +
3 files changed, 15 insertions(+), 1 deletions(-)
diff --git a/dlls/user32/defwnd.c b/dlls/user32/defwnd.c
index ba07ebb..c31956c 100644
--- a/dlls/user32/defwnd.c
+++ b/dlls/user32/defwnd.c
@@ -385,6 +385,18 @@ static LRESULT DEFWND_DefWinProc( HWND hwnd, UINT msg, WPARAM wParam, LPARAM lPa
}
break;
+ case WM_POPUPSYSTEMMENU:
+ {
+ /* This is an undocumented message used by the windows taskbar to
+ display the system menu of windows that belong to other processes. */
+ HMENU menu = GetSystemMenu(hwnd, FALSE);
+
+ if (menu)
+ TrackPopupMenu(menu, TPM_LEFTBUTTON|TPM_RIGHTBUTTON,
+ LOWORD(lParam), HIWORD(lParam), 0, hwnd, NULL);
+ return 0;
+ }
+
case WM_NCACTIVATE:
return NC_HandleNCActivate( hwnd, wParam, lParam );
diff --git a/dlls/user32/spy.c b/dlls/user32/spy.c
index 41caf1d..9fbd74b 100644
--- a/dlls/user32/spy.c
+++ b/dlls/user32/spy.c
@@ -592,7 +592,8 @@ static const char * const MessageTypeNames[SPY_MAX_MSGNUM + 1] =
"WM_PALETTEISCHANGING",
"WM_PALETTECHANGED",
"WM_HOTKEY", /* 0x0312 */
- NULL, NULL, NULL, NULL,
+ "WM_POPUPSYSTEMMENU", /* 0x0313 */
+ NULL, NULL, NULL,
"WM_PRINT", /* 0x0317 */
"WM_PRINTCLIENT", /* 0x0318 */
"WM_APPCOMMAND", /* 0x0319 */
diff --git a/dlls/user32/user_private.h b/dlls/user32/user_private.h
index da635b0..40e57e1 100644
--- a/dlls/user32/user_private.h
+++ b/dlls/user32/user_private.h
@@ -82,6 +82,7 @@ static inline HLOCAL16 LOCAL_Free( HANDLE16 ds, HLOCAL16 handle )
#define GET_DWORD(ptr) (*(const DWORD *)(ptr))
#define WM_SYSTIMER 0x0118
+#define WM_POPUPSYSTEMMENU 0x0313
/* internal messages codes */
enum wine_internal_message
More information about the wine-cvs
mailing list