]> git.saurik.com Git - wxWidgets.git/commitdiff
Early versions of GTK+2 don't have has_toplevel_focus
authorJulian Smart <julian@anthemion.co.uk>
Mon, 27 Sep 2004 12:20:21 +0000 (12:20 +0000)
committerJulian Smart <julian@anthemion.co.uk>
Mon, 27 Sep 2004 12:20:21 +0000 (12:20 +0000)
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@29447 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775

src/gtk/toplevel.cpp
src/gtk1/toplevel.cpp

index 4b737edd73e8121b6867ee9f3ffbaee444555be8..6aec1647c8bc679f1db67b85051ded5faf6e141b 100644 (file)
@@ -1070,9 +1070,15 @@ bool wxTopLevelWindowGTK::SetShape(const wxRegion& region)
 bool wxTopLevelWindowGTK::IsActive()
 {
 #ifdef __WXGTK20__
+    // Order the conditions like this so we don't
+    // have to decide how to include version for GTK+ 1 versus 2
+#if GTK_CHECK_VERSION(2,2,0)
     return GTK_WINDOW( m_widget )->has_toplevel_focus;
 #else
     return wxTopLevelWindowBase::IsActive();
 #endif
+#else
+    return wxTopLevelWindowBase::IsActive();
+#endif
 }
 
index 4b737edd73e8121b6867ee9f3ffbaee444555be8..6aec1647c8bc679f1db67b85051ded5faf6e141b 100644 (file)
@@ -1070,9 +1070,15 @@ bool wxTopLevelWindowGTK::SetShape(const wxRegion& region)
 bool wxTopLevelWindowGTK::IsActive()
 {
 #ifdef __WXGTK20__
+    // Order the conditions like this so we don't
+    // have to decide how to include version for GTK+ 1 versus 2
+#if GTK_CHECK_VERSION(2,2,0)
     return GTK_WINDOW( m_widget )->has_toplevel_focus;
 #else
     return wxTopLevelWindowBase::IsActive();
 #endif
+#else
+    return wxTopLevelWindowBase::IsActive();
+#endif
 }