[gtk/wip/otte/for-master: 20/20] widget: Skip not-drawable widgets in snapshot_child



commit 903af75fa19e9c5945b5ec52df52bf53c012fd08
Author: Timm Bäder <mail baedert org>
Date:   Mon Jan 27 14:21:44 2020 +0100

    widget: Skip not-drawable widgets in snapshot_child
    
    Otherwise we transform the snapshot just to not do anything.

 gtk/gtkwidget.c | 3 +++
 1 file changed, 3 insertions(+)
---
diff --git a/gtk/gtkwidget.c b/gtk/gtkwidget.c
index 62d15c6d2d..d93b4b13a5 100644
--- a/gtk/gtkwidget.c
+++ b/gtk/gtkwidget.c
@@ -12593,6 +12593,9 @@ gtk_widget_snapshot_child (GtkWidget   *widget,
   if (GTK_IS_NATIVE (child))
     return;
 
+  if (!_gtk_widget_get_mapped (child))
+    return;
+
   if (priv->transform)
     {
       gtk_snapshot_save (snapshot);


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]