Set popup menu invoking window in wxWindowBase and not in all ports.
Don't duplicate the code for setting (and unsetting, which was forgotten by at least wxGTK) the popup menu invoking window in all ports but do it in the base class PopupMenu() itself. Also add a helper wxMenuInvokingWindowSetter class which ensures that the invoking window will be unset in any case. git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@64143 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This commit is contained in:
@@ -1788,7 +1788,6 @@ bool wxWindowOS2::DoPopupMenu( wxMenu* pMenu, int nX, int nY )
|
||||
bool bIsWaiting = true;
|
||||
int nHeight;
|
||||
|
||||
pMenu->SetInvokingWindow(this);
|
||||
pMenu->UpdateUI();
|
||||
|
||||
if ( nX == -1 && nY == -1 )
|
||||
@@ -1824,7 +1823,6 @@ bool wxWindowOS2::DoPopupMenu( wxMenu* pMenu, int nX, int nY )
|
||||
::WinDispatchMsg(vHabmain, (PQMSG)&vMsg);
|
||||
}
|
||||
|
||||
pMenu->SetInvokingWindow(NULL);
|
||||
return true;
|
||||
} // end of wxWindowOS2::DoPopupMenu
|
||||
#endif // wxUSE_MENUS_NATIVE
|
||||
|
Reference in New Issue
Block a user