summaryrefslogtreecommitdiff
path: root/gtk/gtkstack.c
diff options
context:
space:
mode:
authorCarlos Garnacho <carlosg@gnome.org>2017-03-31 18:58:16 +0200
committerCarlos Garnacho <carlosg@gnome.org>2017-05-25 16:25:58 +0200
commita72404dd5ab1874ac3d601cd94e0fa7184873851 (patch)
treeb28cd7bb3937ad7f327e7c184ffa65b259179b8d /gtk/gtkstack.c
parentef4f0e53364b51efea1d71f7770e8d52631c3cb0 (diff)
downloadgtk+-a72404dd5ab1874ac3d601cd94e0fa7184873851.tar.gz
gtk: Mass delete all GtkWidget event mask API
We now rely on toplevels receiving and forwarding all the events the windowing should be able to handle. Event masks are no longer a way to determine whether an event is deliverable ot a widget. Events will always be delivered in the three captured/target/bubbled phases, widgets can now just attach GtkEventControllers and let those handle the events.
Diffstat (limited to 'gtk/gtkstack.c')
-rw-r--r--gtk/gtkstack.c15
1 files changed, 3 insertions, 12 deletions
diff --git a/gtk/gtkstack.c b/gtk/gtkstack.c
index 2171cfc8be..1cde1aefe4 100644
--- a/gtk/gtkstack.c
+++ b/gtk/gtkstack.c
@@ -318,7 +318,6 @@ gtk_stack_realize (GtkWidget *widget)
GtkAllocation allocation;
GtkStackChildInfo *info;
GList *l;
- gint event_mask;
GTK_WIDGET_CLASS (gtk_stack_parent_class)->realize (widget);
@@ -326,20 +325,13 @@ gtk_stack_realize (GtkWidget *widget)
priv->view_window =
gdk_window_new_child (gtk_widget_get_window (GTK_WIDGET (stack)),
- gtk_widget_get_events (widget),
+ GDK_ALL_EVENTS_MASK,
&allocation);
gtk_widget_register_window (widget, priv->view_window);
- event_mask = gtk_widget_get_events (widget);
- for (l = priv->children; l != NULL; l = l->next)
- {
- info = l->data;
- event_mask |= gtk_widget_get_events (info->widget);
- }
-
priv->bin_window =
gdk_window_new_child (priv->view_window,
- event_mask,
+ GDK_ALL_EVENTS_MASK,
&(GdkRectangle) {
get_bin_window_x (stack, &allocation),
get_bin_window_y (stack, &allocation),
@@ -1239,8 +1231,7 @@ gtk_stack_add (GtkContainer *container,
if (priv->bin_window)
gdk_window_set_events (priv->bin_window,
- gdk_window_get_events (priv->bin_window) |
- gtk_widget_get_events (child));
+ GDK_ALL_EVENTS_MASK);
g_signal_connect (child, "notify::visible",
G_CALLBACK (stack_child_visibility_notify_cb), stack);