]> git.saurik.com Git - wxWidgets.git/commitdiff
buggy cast == buggy scrolling in Life!
authorRon Lee <ron@debian.org>
Mon, 22 Apr 2002 21:25:48 +0000 (21:25 +0000)
committerRon Lee <ron@debian.org>
Mon, 22 Apr 2002 21:25:48 +0000 (21:25 +0000)
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@15242 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775

src/gtk/window.cpp
src/gtk1/window.cpp

index 108c6b69295c2cb10ab684f08c8df10af46cccc3..4630c80600a237a5d655d888fa43c0fdba8536a0 100644 (file)
@@ -1975,7 +1975,8 @@ static void gtk_window_vscroll_callback( GtkAdjustment *adjust,
 
     win->m_oldVerticalPos = adjust->value;
 
-    wxEventType command = GtkScrollWinTypeToWx(GET_SCROLL_TYPE(win->m_widget));
+    GtkScrolledWindow   *sw = GTK_SCROLLED_WINDOW(win->m_widget);
+    wxEventType         command = GtkScrollWinTypeToWx(GET_SCROLL_TYPE(sw->vscrollbar));
 
     int value = (int)(adjust->value+0.5);
 
@@ -2003,7 +2004,8 @@ static void gtk_window_hscroll_callback( GtkAdjustment *adjust,
     float diff = adjust->value - win->m_oldHorizontalPos;
     if (fabs(diff) < 0.2) return;
 
-    wxEventType command = GtkScrollWinTypeToWx(GET_SCROLL_TYPE(win->m_widget));
+    GtkScrolledWindow   *sw = GTK_SCROLLED_WINDOW(win->m_widget);
+    wxEventType         command = GtkScrollWinTypeToWx(GET_SCROLL_TYPE(sw->hscrollbar));
 
     win->m_oldHorizontalPos = adjust->value;
 
@@ -4328,3 +4330,4 @@ void wxWinModule::OnExit()
         gdk_gc_unref( g_eraseGC );
 }
 
+// vi:sts=4:sw=4:et
index 108c6b69295c2cb10ab684f08c8df10af46cccc3..4630c80600a237a5d655d888fa43c0fdba8536a0 100644 (file)
@@ -1975,7 +1975,8 @@ static void gtk_window_vscroll_callback( GtkAdjustment *adjust,
 
     win->m_oldVerticalPos = adjust->value;
 
-    wxEventType command = GtkScrollWinTypeToWx(GET_SCROLL_TYPE(win->m_widget));
+    GtkScrolledWindow   *sw = GTK_SCROLLED_WINDOW(win->m_widget);
+    wxEventType         command = GtkScrollWinTypeToWx(GET_SCROLL_TYPE(sw->vscrollbar));
 
     int value = (int)(adjust->value+0.5);
 
@@ -2003,7 +2004,8 @@ static void gtk_window_hscroll_callback( GtkAdjustment *adjust,
     float diff = adjust->value - win->m_oldHorizontalPos;
     if (fabs(diff) < 0.2) return;
 
-    wxEventType command = GtkScrollWinTypeToWx(GET_SCROLL_TYPE(win->m_widget));
+    GtkScrolledWindow   *sw = GTK_SCROLLED_WINDOW(win->m_widget);
+    wxEventType         command = GtkScrollWinTypeToWx(GET_SCROLL_TYPE(sw->hscrollbar));
 
     win->m_oldHorizontalPos = adjust->value;
 
@@ -4328,3 +4330,4 @@ void wxWinModule::OnExit()
         gdk_gc_unref( g_eraseGC );
 }
 
+// vi:sts=4:sw=4:et