unset the window as invoking window of wxCurrentPopupMenu (which now exists in all ports and not just wxMSW-based ones) if it being destroyed before the menu itself (modified patch 1837214)
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@50903 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This commit is contained in:
@@ -179,10 +179,6 @@
|
||||
// global variables
|
||||
// ---------------------------------------------------------------------------
|
||||
|
||||
#if wxUSE_MENUS_NATIVE
|
||||
wxMenu *wxCurrentPopupMenu = NULL;
|
||||
#endif // wxUSE_MENUS_NATIVE
|
||||
|
||||
#ifdef __WXWINCE__
|
||||
extern wxChar *wxCanvasClassName;
|
||||
#else
|
||||
@@ -2219,7 +2215,6 @@ bool wxWindowMSW::DoPopupMenu(wxMenu *menu, int x, int y)
|
||||
point.x = x;
|
||||
point.y = y;
|
||||
::ClientToScreen(hWnd, &point);
|
||||
wxCurrentPopupMenu = menu;
|
||||
#if defined(__WXWINCE__)
|
||||
static const UINT flags = 0;
|
||||
#else // !__WXWINCE__
|
||||
@@ -2248,8 +2243,6 @@ bool wxWindowMSW::DoPopupMenu(wxMenu *menu, int x, int y)
|
||||
// for example) and so we do need to process the event immediately
|
||||
wxYieldForCommandsOnly();
|
||||
|
||||
wxCurrentPopupMenu = NULL;
|
||||
|
||||
menu->SetInvokingWindow(NULL);
|
||||
|
||||
return true;
|
||||
|
Reference in New Issue
Block a user