forked from AuroraMiddleware/gtk
stack: Ensure the bin window has an evmask suitable to windowless children
If a child has set_has_window == FALSE, it purely relies on the events set on the parent window, for which the bin window used to just ensure the exposure mask, eating all input events. https://bugzilla.gnome.org/show_bug.cgi?id=734357
This commit is contained in:
parent
62507776fe
commit
8ff47570af
@ -318,6 +318,12 @@ gtk_stack_realize (GtkWidget *widget)
|
||||
attributes.width = allocation.width;
|
||||
attributes.height = allocation.height;
|
||||
|
||||
for (l = priv->children; l != NULL; l = l->next)
|
||||
{
|
||||
info = l->data;
|
||||
attributes.event_mask |= gtk_widget_get_events (info->widget);
|
||||
}
|
||||
|
||||
priv->bin_window =
|
||||
gdk_window_new (priv->view_window, &attributes, attributes_mask);
|
||||
gtk_widget_register_window (widget, priv->bin_window);
|
||||
@ -1133,6 +1139,11 @@ gtk_stack_add (GtkContainer *container,
|
||||
gtk_widget_set_parent_window (child, priv->bin_window);
|
||||
gtk_widget_set_parent (child, GTK_WIDGET (stack));
|
||||
|
||||
if (priv->bin_window)
|
||||
gdk_window_set_events (priv->bin_window,
|
||||
gdk_window_get_events (priv->bin_window) |
|
||||
gtk_widget_get_events (child));
|
||||
|
||||
g_signal_connect (child, "notify::visible",
|
||||
G_CALLBACK (stack_child_visibility_notify_cb), stack);
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user