From 66d5a4f752c6b385f42cb396c39b4e53933e5d32 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Timm=20B=C3=A4der?= Date: Thu, 29 Mar 2018 09:00:48 +0200 Subject: [PATCH] widget: Fix snapshot condition Of course, we only need to snapshot if both width and height > 0, otherwise the result is invisible. --- gtk/gtkwidget.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/gtk/gtkwidget.c b/gtk/gtkwidget.c index e2f1826cbc..fec5fd8c48 100644 --- a/gtk/gtkwidget.c +++ b/gtk/gtkwidget.c @@ -13902,7 +13902,7 @@ gtk_widget_snapshot (GtkWidget *widget, /* Offset to content allocation */ gtk_snapshot_offset (snapshot, margin.left + padding.left + border.left, margin.top + border.top + padding.top); - if (gtk_widget_get_width (widget) > 0 || gtk_widget_get_height (widget) > 0) + if (gtk_widget_get_width (widget) > 0 && gtk_widget_get_height (widget) > 0) klass->snapshot (widget, snapshot); gtk_snapshot_offset (snapshot, - (margin.left + padding.left + border.left), -(margin.top + border.top + padding.top));