widget: Skip not-drawable widgets in snapshot_child
authorTimm Bäder <mail@baedert.org>
Mon, 27 Jan 2020 13:21:44 +0000 (14:21 +0100)
committerBenjamin Otte <otte@redhat.com>
Tue, 4 Feb 2020 16:53:15 +0000 (17:53 +0100)
Otherwise we transform the snapshot just to not do anything.

gtk/gtkwidget.c

index 62d15c6d2d3f46b2415954d46beedc03d120aa61..d93b4b13a5176d7b6a1995a3bc78bfa9756485d6 100644 (file)
@@ -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);