X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/23efdd028e98cd90dc888043d573f45795dc5f43..236a9de39afa090fdee3cf91cb5364ceca69e3f8:/src/gtk/dialog.cpp diff --git a/src/gtk/dialog.cpp b/src/gtk/dialog.cpp index 6da4337b2e..55d5e95511 100644 --- a/src/gtk/dialog.cpp +++ b/src/gtk/dialog.cpp @@ -59,7 +59,8 @@ bool gtk_dialog_delete_callback( GtkWidget *WXUNUSED(widget), GdkEvent *WXUNUSED if (g_isIdle) wxapp_install_idle_handler(); - win->Close(); + if (win->IsEnabled()) + win->Close(); return TRUE; } @@ -79,7 +80,7 @@ static void gtk_dialog_size_callback( GtkWidget *WXUNUSED(widget), GtkAllocation { win->m_width = alloc->width; win->m_height = alloc->height; - win->UpdateSize(); + win->GtkUpdateSize(); } } @@ -266,8 +267,6 @@ bool wxDialog::Create( wxWindow *parent, const wxPoint &pos, const wxSize &size, long style, const wxString &name ) { - g_openDialogs++; - wxTopLevelWindows.Append( this ); m_needParent = FALSE; @@ -344,8 +343,6 @@ wxDialog::~wxDialog() { wxTheApp->ExitMainLoop(); } - - g_openDialogs--; } void wxDialog::SetTitle( const wxString& title ) @@ -630,10 +627,14 @@ int wxDialog::ShowModal() m_modalShowing = TRUE; + g_openDialogs++; + gtk_grab_add( m_widget ); gtk_main(); gtk_grab_remove( m_widget ); + g_openDialogs--; + return GetReturnCode(); }