forked from AuroraMiddleware/gtk
window: Turn popovers into internal children
It turns out popovers are already smart enough to cope with this situation, so let popovers be internal children so things that rely on gtk_container_forall(), like DnD, work without modifications. https://bugzilla.gnome.org/show_bug.cgi?id=725727
This commit is contained in:
parent
99ac2f5c49
commit
59a928f7c8
@ -8088,6 +8088,17 @@ gtk_window_forall (GtkContainer *container,
|
||||
GtkWindowPrivate *priv = window->priv;
|
||||
GtkWidget *child;
|
||||
|
||||
if (include_internals)
|
||||
{
|
||||
GList *l;
|
||||
|
||||
for (l = priv->popovers; l; l = l->next)
|
||||
{
|
||||
GtkWindowPopover *data = l->data;
|
||||
(* callback) (data->widget, callback_data);
|
||||
}
|
||||
}
|
||||
|
||||
child = gtk_bin_get_child (GTK_BIN (container));
|
||||
if (child != NULL)
|
||||
(* callback) (child, callback_data);
|
||||
@ -9843,13 +9854,11 @@ gtk_window_draw (GtkWidget *widget,
|
||||
cairo_t *cr)
|
||||
{
|
||||
GtkWindowPrivate *priv = GTK_WINDOW (widget)->priv;
|
||||
GtkWindowPopover *popover;
|
||||
GtkStyleContext *context;
|
||||
gboolean ret = FALSE;
|
||||
GtkAllocation allocation;
|
||||
GtkBorder window_border;
|
||||
gint title_height;
|
||||
GList *link;
|
||||
|
||||
context = gtk_widget_get_style_context (widget);
|
||||
|
||||
@ -9933,19 +9942,6 @@ gtk_window_draw (GtkWidget *widget,
|
||||
gtk_style_context_restore (context);
|
||||
}
|
||||
|
||||
link = priv->popovers;
|
||||
|
||||
while (link)
|
||||
{
|
||||
popover = link->data;
|
||||
link = link->next;
|
||||
|
||||
if (popover->window && gtk_widget_is_visible (popover->widget) &&
|
||||
gtk_cairo_should_draw_window (cr, popover->window))
|
||||
gtk_container_propagate_draw (GTK_CONTAINER (widget),
|
||||
popover->widget, cr);
|
||||
}
|
||||
|
||||
return ret;
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user