From e5b67ff7d8d08052a13d1c6341ea8c91efa948a6 Mon Sep 17 00:00:00 2001 From: Benjamin Otte Date: Tue, 18 Oct 2016 00:21:33 +0200 Subject: [PATCH] pathbar: Use gdk_window_new_input() --- gtk/gtkpathbar.c | 18 ++++-------------- 1 file changed, 4 insertions(+), 14 deletions(-) diff --git a/gtk/gtkpathbar.c b/gtk/gtkpathbar.c index 9b2265fabd..e8a90bf477 100644 --- a/gtk/gtkpathbar.c +++ b/gtk/gtkpathbar.c @@ -468,8 +468,6 @@ gtk_path_bar_realize (GtkWidget *widget) GtkPathBar *path_bar; GtkAllocation allocation; GdkWindow *window; - GdkWindowAttr attributes; - gint attributes_mask; gtk_widget_set_realized (widget, TRUE); @@ -480,18 +478,10 @@ gtk_path_bar_realize (GtkWidget *widget) gtk_widget_get_allocation (widget, &allocation); - attributes.window_type = GDK_WINDOW_CHILD; - attributes.x = allocation.x; - attributes.y = allocation.y; - attributes.width = allocation.width; - attributes.height = allocation.height; - attributes.wclass = GDK_INPUT_ONLY; - attributes.event_mask = gtk_widget_get_events (widget); - attributes.event_mask |= GDK_SCROLL_MASK; - attributes_mask = GDK_WA_X | GDK_WA_Y; - - path_bar->priv->event_window = gdk_window_new (gtk_widget_get_parent_window (widget), - &attributes, attributes_mask); + path_bar->priv->event_window = gdk_window_new_input (gtk_widget_get_parent_window (widget), + gtk_widget_get_events (widget) + | GDK_SCROLL_MASK, + &allocation); gtk_widget_register_window (widget, path_bar->priv->event_window); }