[Xfce4-commits] [xfce/xfwm4] 01/03: Slimmer and configurable cairo frame

noreply at xfce.org noreply at xfce.org
Tue Jan 20 09:25:01 CET 2015


This is an automated email from the git hooks/post-receive script.

olivier pushed a commit to branch master
in repository xfce/xfwm4.

commit 04b7f25a3a2c2357dcbb71262bd952eca96d3b34
Author: Olivier Fourdan <fourdan at xfce.org>
Date:   Tue Jan 20 08:39:35 2015 +0100

    Slimmer and configurable cairo frame
    
    Make cairo frame slimmer and configurable at build time.
    
    Signed-off-by: Olivier Fourdan <fourdan at xfce.org>
---
 src/wireframe.c |   12 ++++++++----
 1 file changed, 8 insertions(+), 4 deletions(-)

diff --git a/src/wireframe.c b/src/wireframe.c
index dae7530..0f103e6 100644
--- a/src/wireframe.c
+++ b/src/wireframe.c
@@ -43,6 +43,10 @@
 #define OUTLINE_WIDTH 5
 #endif
 
+#ifndef OUTLINE_WIDTH_CAIRO
+#define OUTLINE_WIDTH_CAIRO 2
+#endif
+
 static void
 wireframeDrawXlib (WireFrame *wireframe)
 {
@@ -116,9 +120,9 @@ wireframeDrawCairo (WireFrame *wireframe)
 
     cairo_set_source_rgba (wireframe->cr, wireframe->red, wireframe->green, wireframe->blue, 1.0);
     cairo_rectangle (wireframe->cr,
-                     OUTLINE_WIDTH - 0.5, OUTLINE_WIDTH - 0.5,
-                     wireframe->width - 2 * (OUTLINE_WIDTH - 1) - 1,
-                     wireframe->height- 2 * (OUTLINE_WIDTH - 1) - 1);
+                     OUTLINE_WIDTH_CAIRO / 2, OUTLINE_WIDTH_CAIRO / 2,
+                     wireframe->width - OUTLINE_WIDTH_CAIRO,
+                     wireframe->height - OUTLINE_WIDTH_CAIRO);
     cairo_stroke (wireframe->cr);
 }
 
@@ -242,7 +246,7 @@ wireframeCreate (Client *c)
                                                         wireframe->xwindow, xvisual,
                                                         frameExtentWidth (c), frameExtentHeight (c));
         wireframe->cr = cairo_create (wireframe->surface);
-        cairo_set_line_width (wireframe->cr, OUTLINE_WIDTH);
+        cairo_set_line_width (wireframe->cr, OUTLINE_WIDTH_CAIRO);
         cairo_set_line_join (wireframe->cr, CAIRO_LINE_JOIN_MITER);
     }
 

-- 
To stop receiving notification emails like this one, please contact
the administrator of this repository.


More information about the Xfce4-commits mailing list