]> git.saurik.com Git - wxWidgets.git/blobdiff - src/gtk/window.cpp
With the exceptions of DnD, wxGTk now works with
[wxWidgets.git] / src / gtk / window.cpp
index 26dabd6d51b9da607e9ffeb209ad3ac47f882ef5..e3a3a49f5d3279ce3b0578802970e25f8b4415a3 100644 (file)
 // conditional compilation
 //-------------------------------------------------------------------------
 
-#if (GTK_MINOR_VERSION == 1)
-#if (GTK_MICRO_VERSION >= 5)
+#if (GTK_MINOR_VERSION > 0)
 #define NEW_GTK_SCROLL_CODE
 #endif
-#endif
 
 //-----------------------------------------------------------------------------
 // (debug)
@@ -171,7 +169,6 @@ void debug_focus_in( GtkWidget* widget, const char* name, const char *window )
 //-----------------------------------------------------------------------------
 
 extern wxList     wxPendingDelete;
-extern wxList     wxTopLevelWindows;
 extern bool       g_blockEventsOnDrag;
 extern bool       g_blockEventsOnScroll;
 static bool       g_capturing = FALSE;
@@ -1436,7 +1433,7 @@ bool wxWindow::Create( wxWindow *parent, wxWindowID id,
 
 #ifdef NEW_GTK_SCROLL_CODE
     gtk_scrolled_window_add_with_viewport( GTK_SCROLLED_WINDOW(m_widget), m_wxwindow );
-    GtkViewport *viewport = GTK_VIEWPORT(s_window->child);
+    GtkViewport *viewport = GTK_VIEWPORT( GTK_BIN(s_window)->child );
 #else
     gtk_container_add( GTK_CONTAINER(m_widget), m_wxwindow );
     GtkViewport *viewport = GTK_VIEWPORT(s_window->viewport);
@@ -1932,7 +1929,7 @@ void wxWindow::DoSetClientSize( int width, int height )
             GtkScrolledWindowClass *scroll_class = GTK_SCROLLED_WINDOW_CLASS( GTK_OBJECT(m_widget)->klass );
 
 #ifdef NEW_GTK_SCROLL_CODE
-            GtkWidget *viewport = scroll_window->child;
+            GtkWidget *viewport = GTK_BIN(scroll_window)->child;
 #else
             GtkWidget *viewport = scroll_window->viewport;
 #endif
@@ -1997,7 +1994,7 @@ void wxWindow::GetClientSize( int *width, int *height ) const
             GtkScrolledWindowClass *scroll_class = GTK_SCROLLED_WINDOW_CLASS( GTK_OBJECT(m_widget)->klass );
 
 #ifdef NEW_GTK_SCROLL_CODE
-            GtkWidget *viewport = scroll_window->child;
+            GtkWidget *viewport = GTK_BIN(scroll_window)->child;
 #else
             GtkWidget *viewport = scroll_window->viewport;
 #endif