[gtk+] overlay: Use gdk_window_new_child()



commit c3274eff6ebfc5527bc622bfbd8402c006d83f93
Author: Benjamin Otte <otte redhat com>
Date:   Mon Oct 17 20:21:21 2016 +0200

    overlay: Use gdk_window_new_child()

 gtk/gtkoverlay.c |   16 +++-------------
 1 files changed, 3 insertions(+), 13 deletions(-)
---
diff --git a/gtk/gtkoverlay.c b/gtk/gtkoverlay.c
index 29fc355..9adffd8 100644
--- a/gtk/gtkoverlay.c
+++ b/gtk/gtkoverlay.c
@@ -138,22 +138,12 @@ gtk_overlay_create_child_window (GtkOverlay *overlay,
   GtkWidget *widget = GTK_WIDGET (overlay);
   GtkAllocation allocation;
   GdkWindow *window;
-  GdkWindowAttr attributes;
-  gint attributes_mask;
 
   gtk_overlay_compute_child_allocation (overlay, child, &allocation, NULL);
 
-  attributes.window_type = GDK_WINDOW_CHILD;
-  attributes.wclass = GDK_INPUT_OUTPUT;
-  attributes.width = allocation.width;
-  attributes.height = allocation.height;
-  attributes.x = allocation.x;
-  attributes.y = allocation.y;
-  attributes_mask = GDK_WA_X | GDK_WA_Y;
-  attributes.event_mask = gtk_widget_get_events (widget);
-
-  window = gdk_window_new (gtk_widget_get_window (widget),
-                           &attributes, attributes_mask);
+  window = gdk_window_new_child (gtk_widget_get_window (widget),
+                                 gtk_widget_get_events (widget),
+                                 &allocation);
   gtk_widget_register_window (widget, window);
 
   gdk_window_set_pass_through (window, child->pass_through);


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]