#include "gtkviewport.h"
+#include "gtkadjustment.h"
#include "gtkintl.h"
#include "gtkmarshalers.h"
+#include "gtkprivate.h"
#include "gtkscrollable.h"
#include "gtktypebuiltins.h"
-#include "gtkprivate.h"
/**
* #GtkGrid, #GtkBox, and so on.
*
* If a widget has native scrolling abilities, such as #GtkTextView,
- * #GtkTreeView or #GtkIconview, it can be added to a #GtkScrolledWindow
+ * #GtkTreeView or #GtkIconView, it can be added to a #GtkScrolledWindow
* with gtk_container_add(). If a widget does not, you must first add the
* widget to a #GtkViewport, then add the viewport to the scrolled window.
- * The convenience function gtk_scrolled_window_add_with_viewport() does
- * exactly this, so you can ignore the presence of the viewport.
+ * gtk_container_add() does this automatically if a child that does not
+ * implement #GtkScrollable is added to a #GtkScrolledWindow, so you can
+ * ignore the presence of the viewport.
*
* The #GtkViewport will start scrolling content only if allocated less
* than the child widget's minimum size in a given orientation.
gtk_widget_set_has_window (GTK_WIDGET (viewport), TRUE);
gtk_widget_set_redraw_on_allocate (GTK_WIDGET (viewport), FALSE);
- gtk_container_set_resize_mode (GTK_CONTAINER (viewport), GTK_RESIZE_QUEUE);
priv->shadow_type = GTK_SHADOW_IN;
priv->view_window = NULL;
new_y = - gtk_adjustment_get_value (vadjustment);
if (new_x != old_x || new_y != old_y)
- {
- gdk_window_move (priv->bin_window, new_x, new_y);
- gdk_window_process_updates (priv->bin_window, TRUE);
- }
+ gdk_window_move (priv->bin_window, new_x, new_y);
}
}