// destroy children before destroying this window itself
DestroyChildren();
- if (m_widget)
- Show( false );
-
// delete before the widgets to avoid a crash on solaris
if ( m_imContext )
{
void wxWindowGTK::SetCanFocus(bool canFocus)
{
- if ( m_widget )
- gtk_widget_set_can_focus(m_widget, canFocus);
+ wxCHECK_RET(m_widget, "invalid window");
+
+ gtk_widget_set_can_focus(m_widget, canFocus);
if ( m_wxwindow && (m_widget != m_wxwindow) )
{
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)
{
gtk_main_iteration();