]> git.saurik.com Git - wxWidgets.git/blobdiff - src/gtk/scrolwin.cpp
revert updating GTK size hints when window decorations change, it messes up min size...
[wxWidgets.git] / src / gtk / scrolwin.cpp
index 2f0bea636a90f9437eacede1ec31f74d28f704a1..7519c5c58961b4a9cbd0a0742bb3a430c2b8edb1 100644 (file)
@@ -108,23 +108,19 @@ void wxScrollHelperNative::DoAdjustScrollbar(GtkRange* range,
         *linesPerPage = 0;
     }
 
         *linesPerPage = 0;
     }
 
-    // ensure that the scroll position is always in valid range
-    if ( *pos > *lines )
-        *pos = *lines;
-
     GtkAdjustment* adj = range->adjustment;
     adj->step_increment = 1;
     adj->page_increment =
     adj->page_size = page_size;
     gtk_range_set_range(range, 0, upper);
     GtkAdjustment* adj = range->adjustment;
     adj->step_increment = 1;
     adj->page_increment =
     adj->page_size = page_size;
     gtk_range_set_range(range, 0, upper);
+
+    // ensure that the scroll position is always in valid range
+    if (*pos > *lines)
+        *pos = *lines;
 }
 
 void wxScrollHelperNative::AdjustScrollbars()
 {
 }
 
 void wxScrollHelperNative::AdjustScrollbars()
 {
-    // this flag indicates which window has the scrollbars
-    m_win->m_hasScrolling = m_xScrollPixelsPerLine != 0 ||
-                                m_yScrollPixelsPerLine != 0;
-
     int vw, vh;
     m_targetWindow->GetVirtualSize( &vw, &vh );
 
     int vw, vh;
     m_targetWindow->GetVirtualSize( &vw, &vh );