]> git.saurik.com Git - wxWidgets.git/blobdiff - src/gtk/msgdlg.cpp
don't use GetThemeMetric(HP_HEADERITEM, TMT_HEIGHT) as it doesn't seem to work; imple...
[wxWidgets.git] / src / gtk / msgdlg.cpp
index 14e71134c23c0a9e49d67954ac6cf94682621e22..7202ba2a3249ba44c8857946c796fa18d5b84ff9 100644 (file)
@@ -77,9 +77,9 @@ void wxMessageDialog::GTKCreateMsgDialog()
     }
 
     wxString message;
-#if GTK_CHECK_VERSION(2, 4, 0)
+#if GTK_CHECK_VERSION(2, 6, 0)
     bool needsExtMessage = false;
-    if ( gtk_check_version(2, 4, 0) == NULL && !m_extendedMessage.empty() )
+    if ( gtk_check_version(2, 6, 0) == NULL && !m_extendedMessage.empty() )
     {
         message = m_message;
         needsExtMessage = true;
@@ -98,7 +98,7 @@ void wxMessageDialog::GTKCreateMsgDialog()
                                       "%s",
                                       (const char*)wxGTK_CONV(message));
 
-#if GTK_CHECK_VERSION(2, 4, 0)
+#if GTK_CHECK_VERSION(2, 6, 0)
     if ( needsExtMessage )
     {
         gtk_message_dialog_format_secondary_text
@@ -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();