Alexandre Julliard : user32: Setup system menu even when used through TrackPopupMenu.

Alexandre Julliard julliard at winehq.org
Wed Jun 8 11:07:35 CDT 2016


Module: wine
Branch: master
Commit: 83ed0a636b334b9c5175ad897270eb8d990dba01
URL:    http://source.winehq.org/git/wine.git/?a=commit;h=83ed0a636b334b9c5175ad897270eb8d990dba01

Author: Alexandre Julliard <julliard at winehq.org>
Date:   Wed Jun  8 16:12:26 2016 +0900

user32: Setup system menu even when used through TrackPopupMenu.

Signed-off-by: Alexandre Julliard <julliard at winehq.org>

---

 dlls/user32/menu.c | 4 ++++
 1 file changed, 4 insertions(+)

diff --git a/dlls/user32/menu.c b/dlls/user32/menu.c
index e42d8f7..52d09ce 100644
--- a/dlls/user32/menu.c
+++ b/dlls/user32/menu.c
@@ -3479,6 +3479,10 @@ BOOL WINAPI TrackPopupMenuEx( HMENU hMenu, UINT wFlags, INT x, INT y,
         if (!(wFlags & TPM_NONOTIFY))
             SendMessageW( hWnd, WM_INITMENUPOPUP, (WPARAM)hMenu, 0);
 
+        if (menu->wFlags & MF_SYSMENU)
+            MENU_InitSysMenuPopup( hMenu, GetWindowLongW( hWnd, GWL_STYLE ),
+                                   GetClassLongW( hWnd, GCL_STYLE));
+
         if (MENU_ShowPopup( hWnd, hMenu, 0, wFlags, x, y, 0, 0 ))
             ret = MENU_TrackMenu( hMenu, wFlags | TPM_POPUPMENU, 0, 0, hWnd,
                                   lpTpm ? &lpTpm->rcExclude : NULL );




More information about the wine-cvs mailing list