[gtk/wip/matthiasc/popup5: 44/186] widget: Don't snapshot foreign children
- From: Matthias Clasen <matthiasc src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gtk/wip/matthiasc/popup5: 44/186] widget: Don't snapshot foreign children
- Date: Tue, 28 May 2019 20:12:39 +0000 (UTC)
commit 66602a13c123f7fcc7da49a7068e976b2120b98f
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
surface, since those will do their own snapshot.
gtk/gtkwidget.c | 5 +++++
1 file changed, 5 insertions(+)
---
diff --git a/gtk/gtkwidget.c b/gtk/gtkwidget.c
index b771d25b51..0f21d1d360 100644
--- a/gtk/gtkwidget.c
+++ b/gtk/gtkwidget.c
@@ -13367,6 +13367,8 @@ gtk_widget_forall (GtkWidget *widget,
*
* gtk_widget_snapshot_child() takes care of translating the origin of
* @snapshot, and deciding whether the child needs to be snapshot.
+ *
+ * This function does nothing for children that implement #GtkNative.
**/
void
gtk_widget_snapshot_child (GtkWidget *widget,
@@ -13378,6 +13380,9 @@ gtk_widget_snapshot_child (GtkWidget *widget,
g_return_if_fail (_gtk_widget_get_parent (child) == widget);
g_return_if_fail (snapshot != NULL);
+ if (GTK_IS_NATIVE (child))
+ return;
+
gtk_snapshot_save (snapshot);
gtk_snapshot_transform (snapshot, priv->transform);
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]