]> Pileus Git - ~andy/gtk/blobdiff - gtk/gtklayout.c
Some more documentation fixes
[~andy/gtk] / gtk / gtklayout.c
index 0f9cfed09bd4982f03978baf3165fd17d5712196..73cdb62f2ac50fceb0166ec8a7389c904a01cb83 100644 (file)
@@ -12,9 +12,7 @@
  * Lesser General Public License for more details.
  *
  * You should have received a copy of the GNU Lesser General Public
- * License along with this library; if not, write to the
- * Free Software Foundation, Inc., 59 Temple Place - Suite 330,
- * Boston, MA 02111-1307, USA.
+ * License along with this library. If not, see <http://www.gnu.org/licenses/>.
  *
  * GtkLayout: Widget for scrolling of arbitrary-sized areas.
  *
 
 #include "gdk/gdk.h"
 
-#include "gtkprivate.h"
+#include "gtkadjustment.h"
 #include "gtkintl.h"
 #include "gtkmarshalers.h"
+#include "gtkprivate.h"
 #include "gtkscrollable.h"
 
 
@@ -886,7 +885,7 @@ gtk_layout_realize (GtkWidget *widget)
   window = gdk_window_new (gtk_widget_get_parent_window (widget),
                            &attributes, attributes_mask);
   gtk_widget_set_window (widget, window);
-  gdk_window_set_user_data (window, widget);
+  gtk_widget_register_window (widget, window);
 
   gtk_widget_get_allocation (widget, &allocation);
 
@@ -894,12 +893,13 @@ gtk_layout_realize (GtkWidget *widget)
   attributes.y = - gtk_adjustment_get_value (priv->vadjustment);
   attributes.width = MAX (priv->width, allocation.width);
   attributes.height = MAX (priv->height, allocation.height);
-  attributes.event_mask = GDK_EXPOSURE_MASK | GDK_SCROLL_MASK | 
+  attributes.event_mask = GDK_EXPOSURE_MASK | GDK_SCROLL_MASK |
+                          GDK_SMOOTH_SCROLL_MASK | 
                           gtk_widget_get_events (widget);
 
   priv->bin_window = gdk_window_new (window,
                                      &attributes, attributes_mask);
-  gdk_window_set_user_data (priv->bin_window, widget);
+  gtk_widget_register_window (widget, priv->bin_window);
   gtk_style_context_set_background (gtk_widget_get_style_context (widget), priv->bin_window);
 
   tmp_list = priv->children;
@@ -958,7 +958,7 @@ gtk_layout_unrealize (GtkWidget *widget)
   GtkLayout *layout = GTK_LAYOUT (widget);
   GtkLayoutPrivate *priv = layout->priv;
 
-  gdk_window_set_user_data (priv->bin_window, NULL);
+  gtk_widget_unregister_window (widget, priv->bin_window);
   gdk_window_destroy (priv->bin_window);
   priv->bin_window = NULL;
 
@@ -1123,7 +1123,5 @@ gtk_layout_adjustment_changed (GtkAdjustment *adjustment,
       gdk_window_move (priv->bin_window,
                       - gtk_adjustment_get_value (priv->hadjustment),
                       - gtk_adjustment_get_value (priv->vadjustment));
-
-      gdk_window_process_updates (priv->bin_window, TRUE);
     }
 }