Process menu command AFTER menu is dismissed (or it stays there).
Still some problems but menus and message box beginning to work in MicroWindows.
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@10846
c3d73ce0-8a6f-49c7-b76d-
6d57e0e08775
wxASSERT_MSG( !item->IsSeparator() && !item->IsSubMenu(),
_T("can't click this item") );
wxASSERT_MSG( !item->IsSeparator() && !item->IsSubMenu(),
_T("can't click this item") );
- m_menu->ClickItem(item);
// close all menus
DismissAndNotify();
// close all menus
DismissAndNotify();
+
+ menu->ClickItem(item);
}
void wxPopupMenuWindow::OpenSubmenu(wxMenuItem *item, InputMethod how)
}
void wxPopupMenuWindow::OpenSubmenu(wxMenuItem *item, InputMethod how)
// that we pass 0 as width to position the menu exactly below the
// item, not to the right of it
wxRect rectItem = GetItemRect(m_current);
// that we pass 0 as width to position the menu exactly below the
// item, not to the right of it
wxRect rectItem = GetItemRect(m_current);
+
+ // Release mouse, because the menu will get the capture.
+ if (HasCapture())
+ ReleaseMouse();
+
m_menuShown->Popup(ClientToScreen(rectItem.GetPosition()),
wxSize(0, rectItem.GetHeight()),
selectFirst);
m_menuShown->Popup(ClientToScreen(rectItem.GetPosition()),
wxSize(0, rectItem.GetHeight()),
selectFirst);