From cd184b0f40fa607df131062ccf7a0f24eda06fae Mon Sep 17 00:00:00 2001 From: Benjamin Otte Date: Tue, 14 Jan 2014 03:22:15 +0100 Subject: [PATCH] themingengine: Don't draw 0px borders Theming code gets confused when computing the spacing for 0px wide dots and then divides by 0. And then cairo complains and stops drawing anything forever out of spite and then we end up with a single color screen. https://bugzilla.gnome.org/show_bug.cgi?id=721800 --- gtk/gtkthemingengine.c | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/gtk/gtkthemingengine.c b/gtk/gtkthemingengine.c index b38059bab0..136fcc657f 100644 --- a/gtk/gtkthemingengine.c +++ b/gtk/gtkthemingengine.c @@ -1591,6 +1591,13 @@ render_border (cairo_t *cr, if (hidden_side & (1 << i)) continue; + /* NB: code below divides by this value */ + /* a border smaller than this will not noticably modify + * pixels on screen, and since we don't compare with 0, + * we'll use this value */ + if (border_width[i] < 1.0 / 1024) + continue; + switch (border_style[i]) { case GTK_BORDER_STYLE_NONE: