]> git.saurik.com Git - wxWidgets.git/blobdiff - src/gtk/msgdlg.cpp
Fix referencing of cairo_t returned from wxDCImpl::GetCairoContext().
[wxWidgets.git] / src / gtk / msgdlg.cpp
index 5bbdc930b815ccc555ccdf5cd3c17aebe6c6b373..8bc0dae840bda65d3b889cbca334861c546a4ebd 100644 (file)
@@ -4,7 +4,6 @@
 // Author:      Vaclav Slavik
 // Modified by:
 // Created:     2003/02/28
-// RCS-ID:      $Id$
 // Copyright:   (c) Vaclav Slavik, 2003
 // Licence:     wxWindows licence
 /////////////////////////////////////////////////////////////////////////////
     #include "wx/intl.h"
 #endif
 
+#include "wx/modalhook.h"
+
 #include <gtk/gtk.h>
 #include "wx/gtk/private.h"
 #include "wx/gtk/private/messagetype.h"
 #include "wx/gtk/private/mnemonics.h"
+#include "wx/gtk/private/dialogcount.h"
 
 #if wxUSE_LIBHILDON
     #include <hildon-widgets/hildon-note.h>
@@ -273,6 +275,8 @@ void wxMessageDialog::GTKCreateMsgDialog()
 
 int wxMessageDialog::ShowModal()
 {
+    WX_HOOK_MODAL_DIALOG();
+
     // break the mouse capture as it would interfere with modal dialog (see
     // wxDialog::ShowModal)
     wxWindow * const win = wxWindow::GetCapture();
@@ -291,6 +295,8 @@ int wxMessageDialog::ShowModal()
     if (m_parent)
         gtk_window_present( GTK_WINDOW(m_parent->m_widget) );
 
+    wxOpenModalDialogLocker modalLocker;
+
     gint result = gtk_dialog_run(GTK_DIALOG(m_widget));
     GTKDisconnect(m_widget);
     gtk_widget_destroy(m_widget);