From e8fef1147f5113672dc8c4eb3be649421def21d9 Mon Sep 17 00:00:00 2001 From: Benjamin Otte Date: Sun, 8 Apr 2018 20:09:45 +0200 Subject: [PATCH] widget: Don't do a 0-size check before snapshotting Even widgets with an empty allocation may still want to draw stuff. Examples include shadows or child widgets with negative margins. Fixes GtkEntry's progressbar not showing up anymore. --- gtk/gtkwidget.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/gtk/gtkwidget.c b/gtk/gtkwidget.c index 3fa0ee6cdc..99216c6904 100644 --- a/gtk/gtkwidget.c +++ b/gtk/gtkwidget.c @@ -13336,8 +13336,7 @@ gtk_widget_create_render_node (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) - klass->snapshot (widget, snapshot); + klass->snapshot (widget, snapshot); gtk_snapshot_offset (snapshot, - (padding.left + border.left), -(border.top + padding.top)); gtk_css_style_snapshot_outline (style,