]> git.saurik.com Git - wxWidgets.git/commitdiff
Implement wxSTAY_ON_TOP for wxMessageDialog in wxGTK.
authorVadim Zeitlin <vadim@wxwidgets.org>
Fri, 4 Sep 2009 16:20:57 +0000 (16:20 +0000)
committerVadim Zeitlin <vadim@wxwidgets.org>
Fri, 4 Sep 2009 16:20:57 +0000 (16:20 +0000)
Call gtk_window_set_keep_above() to force the message dialog to be above the
other windows (some WMs do this by default anyhow but not all).

Closes #11163.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@61828 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775

interface/wx/msgdlg.h
src/gtk/msgdlg.cpp

index 809bf9f90a4af5927cc3a2b8053f67580c71017d..95a0f80743b333ef653cadfba21f6866a55dcf49 100644 (file)
@@ -51,8 +51,8 @@
         @c wxYES_NO is not given so it is usually unnecessary to specify it
         explicitly.
     @style{wxSTAY_ON_TOP}
         @c wxYES_NO is not given so it is usually unnecessary to specify it
         explicitly.
     @style{wxSTAY_ON_TOP}
-        Makes the message box stay on top of all other windows (currently
-        implemented only under MSW).
+        Makes the message box stay on top of all other windows and not only
+        just its parent (currently implemented only under MSW and GTK).
     @endStyleTable
 
     @library{wxcore}
     @endStyleTable
 
     @library{wxcore}
index 3b94755b95fef4da618bfb2e113376ace4947f49..0b2b5f9bb20ed46ca864ca801b1404dce2221ee2 100644 (file)
@@ -190,6 +190,11 @@ void wxMessageDialog::GTKCreateMsgDialog()
 
     GtkDialog * const dlg = GTK_DIALOG(m_widget);
 
 
     GtkDialog * const dlg = GTK_DIALOG(m_widget);
 
+    if ( m_dialogStyle & wxSTAY_ON_TOP )
+    {
+        gtk_window_set_keep_above(GTK_WINDOW(m_widget), TRUE);
+    }
+
     // we need to add buttons manually if we use custom labels or always for
     // Yes/No/Cancel dialog as GTK+ doesn't support it natively and when using
     // Hildon we add all the buttons manually as it doesn't support too many of
     // we need to add buttons manually if we use custom labels or always for
     // Yes/No/Cancel dialog as GTK+ doesn't support it natively and when using
     // Hildon we add all the buttons manually as it doesn't support too many of