pathbar: Use gdk_window_new_input()

This commit is contained in:
Benjamin Otte 2016-10-18 00:21:33 +02:00
parent 978684cf29
commit e5b67ff7d8

View File

@ -468,8 +468,6 @@ gtk_path_bar_realize (GtkWidget *widget)
GtkPathBar *path_bar; GtkPathBar *path_bar;
GtkAllocation allocation; GtkAllocation allocation;
GdkWindow *window; GdkWindow *window;
GdkWindowAttr attributes;
gint attributes_mask;
gtk_widget_set_realized (widget, TRUE); gtk_widget_set_realized (widget, TRUE);
@ -480,18 +478,10 @@ gtk_path_bar_realize (GtkWidget *widget)
gtk_widget_get_allocation (widget, &allocation); gtk_widget_get_allocation (widget, &allocation);
attributes.window_type = GDK_WINDOW_CHILD; path_bar->priv->event_window = gdk_window_new_input (gtk_widget_get_parent_window (widget),
attributes.x = allocation.x; gtk_widget_get_events (widget)
attributes.y = allocation.y; | GDK_SCROLL_MASK,
attributes.width = allocation.width; &allocation);
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);
gtk_widget_register_window (widget, path_bar->priv->event_window); gtk_widget_register_window (widget, path_bar->priv->event_window);
} }