call wxMenubarSetInvokingWindow for submenus appended during run-time
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@6705 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This commit is contained in:
parent
eeb75ae603
commit
e72007907a
@ -872,6 +872,12 @@ bool wxMenu::GtkAppend(wxMenuItem *mitem)
|
|||||||
#endif // GTK 1.2/1.0
|
#endif // GTK 1.2/1.0
|
||||||
|
|
||||||
gtk_menu_item_set_submenu( GTK_MENU_ITEM(menuItem), mitem->GetSubMenu()->m_menu );
|
gtk_menu_item_set_submenu( GTK_MENU_ITEM(menuItem), mitem->GetSubMenu()->m_menu );
|
||||||
|
|
||||||
|
// if adding a submenu to a menu already existing in the menu bar, we
|
||||||
|
// must set invoking window to allow processing events from this
|
||||||
|
// submenu
|
||||||
|
if ( m_invokingWindow )
|
||||||
|
wxMenubarSetInvokingWindow(mitem->GetSubMenu(), m_invokingWindow);
|
||||||
}
|
}
|
||||||
else // a normal item
|
else // a normal item
|
||||||
{
|
{
|
||||||
|
@ -872,6 +872,12 @@ bool wxMenu::GtkAppend(wxMenuItem *mitem)
|
|||||||
#endif // GTK 1.2/1.0
|
#endif // GTK 1.2/1.0
|
||||||
|
|
||||||
gtk_menu_item_set_submenu( GTK_MENU_ITEM(menuItem), mitem->GetSubMenu()->m_menu );
|
gtk_menu_item_set_submenu( GTK_MENU_ITEM(menuItem), mitem->GetSubMenu()->m_menu );
|
||||||
|
|
||||||
|
// if adding a submenu to a menu already existing in the menu bar, we
|
||||||
|
// must set invoking window to allow processing events from this
|
||||||
|
// submenu
|
||||||
|
if ( m_invokingWindow )
|
||||||
|
wxMenubarSetInvokingWindow(mitem->GetSubMenu(), m_invokingWindow);
|
||||||
}
|
}
|
||||||
else // a normal item
|
else // a normal item
|
||||||
{
|
{
|
||||||
|
Loading…
Reference in New Issue
Block a user