]> git.saurik.com Git - wxWidgets.git/blobdiff - src/gtk/msgdlg.cpp
use const for xpm icons
[wxWidgets.git] / src / gtk / msgdlg.cpp
index 267d54db07a006af8ee616becad40b5f19172367..0b4dd87c22ac5d326881141bbbcafd9a121f7acf 100644 (file)
@@ -16,7 +16,7 @@
     #pragma hdrstop
 #endif
 
-#if wxUSE_MSGDLG && defined(__WXGTK20__) && !defined(__WXGPE__)
+#if wxUSE_MSGDLG && !defined(__WXGPE__)
 
 #include "wx/msgdlg.h"
 
@@ -137,6 +137,12 @@ void wxMessageDialog::GTKCreateMsgDialog()
 
 int wxMessageDialog::ShowModal()
 {
+    // break the mouse capture as it would interfere with modal dialog (see
+    // wxDialog::ShowModal)
+    wxWindow * const win = wxWindow::GetCapture();
+    if ( win )
+        win->GTKReleaseMouseAndNotify();
+
     if ( !m_widget )
     {
         GTKCreateMsgDialog();
@@ -173,4 +179,4 @@ int wxMessageDialog::ShowModal()
 }
 
 
-#endif // wxUSE_MSGDLG && defined(__WXGTK20__) && !defined(__WXGPE__)
+#endif // wxUSE_MSGDLG && !defined(__WXGPE__)