diff --git a/src/gtk/toplevel.cpp b/src/gtk/toplevel.cpp index 3a2e548c3f..5ef9d91714 100644 --- a/src/gtk/toplevel.cpp +++ b/src/gtk/toplevel.cpp @@ -507,9 +507,12 @@ bool wxTopLevelWindowGTK::Create( wxWindow *parent, #endif #if GTK_CHECK_VERSION(2,4,0) - if (style & wxSTAY_ON_TOP) + if (!gtk_check_version(2,4,0)) { - gtk_window_set_keep_above(GTK_WINDOW(m_widget), TRUE); + if (style & wxSTAY_ON_TOP) + { + gtk_window_set_keep_above(GTK_WINDOW(m_widget), TRUE); + } } #endif diff --git a/src/gtk1/toplevel.cpp b/src/gtk1/toplevel.cpp index 3a2e548c3f..5ef9d91714 100644 --- a/src/gtk1/toplevel.cpp +++ b/src/gtk1/toplevel.cpp @@ -507,9 +507,12 @@ bool wxTopLevelWindowGTK::Create( wxWindow *parent, #endif #if GTK_CHECK_VERSION(2,4,0) - if (style & wxSTAY_ON_TOP) + if (!gtk_check_version(2,4,0)) { - gtk_window_set_keep_above(GTK_WINDOW(m_widget), TRUE); + if (style & wxSTAY_ON_TOP) + { + gtk_window_set_keep_above(GTK_WINDOW(m_widget), TRUE); + } } #endif