[gtk+] pathbar: Use gdk_window_new_input()
- From: Benjamin Otte <otte src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gtk+] pathbar: Use gdk_window_new_input()
- Date: Mon, 17 Oct 2016 22:42:11 +0000 (UTC)
commit e5b67ff7d8d08052a13d1c6341ea8c91efa948a6
Author: Benjamin Otte <otte redhat com>
Date: Tue Oct 18 00:21:33 2016 +0200
pathbar: Use gdk_window_new_input()
gtk/gtkpathbar.c | 18 ++++--------------
1 files changed, 4 insertions(+), 14 deletions(-)
---
diff --git a/gtk/gtkpathbar.c b/gtk/gtkpathbar.c
index 9b2265f..e8a90bf 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);
}
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]