]> git.saurik.com Git - wxWidgets.git/blobdiff - src/gtk1/window.cpp
corrected warnings when compiling with -Wall -W
[wxWidgets.git] / src / gtk1 / window.cpp
index 108c6b69295c2cb10ab684f08c8df10af46cccc3..bad1ac7648dc2979e3853ff25e6360699017729e 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;
 
@@ -3261,7 +3263,7 @@ void wxWindowGTK::SetFocus()
         }
     }
 
-    (void)DoSendFocusEvents(this);
+    (void)DoSendFocusEvents((wxWindow*)this);
 }
 
 bool wxWindowGTK::AcceptsFocus() const
@@ -3483,7 +3485,7 @@ void wxWindowGTK::GtkSendPaintEvents()
         while (parent && !parent->IsTopLevel())
             parent = parent->GetParent();
         if (!parent)
-            parent = this;
+            parent = (wxWindow*)this;
     
         wxRegionIterator upd( m_updateRegion );
         while (upd)
@@ -4328,3 +4330,4 @@ void wxWinModule::OnExit()
         gdk_gc_unref( g_eraseGC );
 }
 
+// vi:sts=4:sw=4:et