[gtk/wip/baedert/for-master: 27/31] widget: Skip not-drawable widgets in snapshot_child



commit 21147d1c71582322c28b74dafdd5d2be3ff0deac
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 5f47c384e4..90027e69c1 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_is_drawable (child))
+    return;
+
   if (priv->transform)
     {
       gtk_snapshot_save (snapshot);


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