diff --git a/dlls/user32/defwnd.c b/dlls/user32/defwnd.c index ba07ebb6b1..c31956c841 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 41caf1d0b0..9fbd74b350 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 da635b0ab4..40e57e1f09 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