]> Pileus Git - ~andy/gtk/blobdiff - gtk/gtkviewport.c
Improve AtkAction implementations
[~andy/gtk] / gtk / gtkviewport.c
index eea91ad9aec30f578dca5ccccc2c5862477e276e..e82d70baee0a1cd35b5454b29c7fc7ad02631154 100644 (file)
 
 #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.
@@ -240,7 +242,6 @@ gtk_viewport_init (GtkViewport *viewport)
   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;
@@ -900,10 +901,7 @@ gtk_viewport_adjustment_value_changed (GtkAdjustment *adjustment,
       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);
     }
 }