[gtk/wip/matthiasc/popup2: 48/51] widget: Don't snapshot foreign children
- From: Matthias Clasen <matthiasc src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gtk/wip/matthiasc/popup2: 48/51] widget: Don't snapshot foreign children
- Date: Mon, 18 Mar 2019 12:49:13 +0000 (UTC)
commit df87df0926d294623422468642cedfd98f09d6b8
Author: Matthias Clasen <mclasen redhat com>
Date: Mon Mar 18 07:51:47 2019 -0400
widget: Don't snapshot foreign children
When snapshotting, we walk down the widget tree.
We need to skip children that have a different
root, since those will do their own snapshot.
gtk/gtkwidget.c | 5 ++++-
1 file changed, 4 insertions(+), 1 deletion(-)
---
diff --git a/gtk/gtkwidget.c b/gtk/gtkwidget.c
index 5b835c27a5..1238d5c486 100644
--- a/gtk/gtkwidget.c
+++ b/gtk/gtkwidget.c
@@ -791,7 +791,10 @@ gtk_widget_real_snapshot (GtkWidget *widget,
for (child = _gtk_widget_get_first_child (widget);
child != NULL;
child = _gtk_widget_get_next_sibling (child))
- gtk_widget_snapshot_child (widget, child, snapshot);
+ {
+ if (gtk_widget_get_root (child) == gtk_widget_get_root (widget))
+ gtk_widget_snapshot_child (widget, child, snapshot);
+ }
}
static gboolean
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]