[gtk+] themingengine: Don't draw 0px borders
- From: Benjamin Otte <otte src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gtk+] themingengine: Don't draw 0px borders
- Date: Tue, 14 Jan 2014 02:39:51 +0000 (UTC)
commit cd184b0f40fa607df131062ccf7a0f24eda06fae
Author: Benjamin Otte <otte redhat com>
Date: Tue Jan 14 03:22:15 2014 +0100
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 files changed, 7 insertions(+), 0 deletions(-)
---
diff --git a/gtk/gtkthemingengine.c b/gtk/gtkthemingengine.c
index b38059b..136fcc6 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:
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]