prevent infinite loop if gtk_menu_popup() fails, fixes #15387
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@74624 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This commit is contained in:
@@ -4368,6 +4368,13 @@ bool wxWindowGTK::DoPopupMenu( wxMenu *menu, int x, int y )
|
|||||||
gtk_get_current_event_time()
|
gtk_get_current_event_time()
|
||||||
);
|
);
|
||||||
|
|
||||||
|
// it is possible for gtk_menu_popup() to fail
|
||||||
|
if (!gtk_widget_get_visible(GTK_WIDGET(menu->m_menu)))
|
||||||
|
{
|
||||||
|
menu->m_popupShown = false;
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
|
||||||
while (menu->m_popupShown)
|
while (menu->m_popupShown)
|
||||||
{
|
{
|
||||||
gtk_main_iteration();
|
gtk_main_iteration();
|
||||||
|
Reference in New Issue
Block a user