]> git.saurik.com Git - wxWidgets.git/commitdiff
Fixed MDI context menu event handling problem (Stefan Kowski)
authorJulian Smart <julian@anthemion.co.uk>
Fri, 16 Dec 2005 14:52:57 +0000 (14:52 +0000)
committerJulian Smart <julian@anthemion.co.uk>
Fri, 16 Dec 2005 14:52:57 +0000 (14:52 +0000)
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@36407 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775

docs/changes.txt
src/msw/mdi.cpp

index 4a48055676b14b5d6d2e6d5837428221fbd14015..be2ad0e647fdf8144e156d2f05b19d06c1a0c7c5 100644 (file)
@@ -44,6 +44,7 @@ wxMSW:
 - wxFileDialog respects absence of wxCHANGE_DIR flag under NT (Brad Anderson).
 - Switching page of a hidden notebook doesn't lose focus (Jamie Gadd).
 - Removed wxImageList *GetImageList(int) const.
 - wxFileDialog respects absence of wxCHANGE_DIR flag under NT (Brad Anderson).
 - Switching page of a hidden notebook doesn't lose focus (Jamie Gadd).
 - Removed wxImageList *GetImageList(int) const.
+- Fixed MDI context menu problem.
 
 wxGTK:
 
 
 wxGTK:
 
index b0ec95a99dc42256e66ed35cd3cf56afd0518841..ac7afcc3be5deca9dbe9e12b8edc4d716b48ead0 100644 (file)
@@ -545,6 +545,14 @@ bool wxMDIParentFrame::HandleCommand(WXWORD id, WXWORD cmd, WXHWND hwnd)
             return win->MSWCommand(cmd, id);
     }
 
             return win->MSWCommand(cmd, id);
     }
 
+    if (wxCurrentPopupMenu)
+    {
+        wxMenu *popupMenu = wxCurrentPopupMenu;
+        wxCurrentPopupMenu = NULL;
+        if (popupMenu->MSWCommand(cmd, id))
+            return true;
+    }
+
     // is it one of standard MDI commands?
     WXWPARAM wParam = 0;
     WXLPARAM lParam = 0;
     // is it one of standard MDI commands?
     WXWPARAM wParam = 0;
     WXLPARAM lParam = 0;