1From e9bb8cd865be818d2808b9d167e35658e0e78cf3 Mon Sep 17 00:00:00 2001 2From: Jeffy Chen <jeffy.chen@rock-chips.com> 3Date: Mon, 18 Nov 2019 17:43:34 +0800 4Subject: [PATCH] desktop: Support outline mode in paint_rubber_banding_rect 5 6Set env "PCMANFM_OUTLINE_MODE" to enable it. 7 8Signed-off-by: Jeffy Chen <jeffy.chen@rock-chips.com> 9--- 10 src/desktop.c | 6 ++++++ 11 1 file changed, 6 insertions(+) 12 13diff --git a/src/desktop.c b/src/desktop.c 14index 4ec77b9..7123f39 100644 15--- a/src/desktop.c 16+++ b/src/desktop.c 17@@ -35,6 +35,8 @@ 18 #include <X11/Xatom.h> 19 #include <math.h> 20 21+#include <stdlib.h> 22+ 23 #include <cairo-xlib.h> 24 25 #include "pref.h" 26@@ -2073,6 +2075,10 @@ static void paint_rubber_banding_rect(FmDesktop* self, cairo_t* cr, GdkRectangle 27 cairo_set_source_rgba(cr, (gdouble)clr.red/65535, (gdouble)clr.green/65536, (gdouble)clr.blue/65535, (gdouble)alpha/100); 28 gdk_cairo_rectangle(cr, &rect); 29 cairo_clip (cr); 30+ 31+ // HACK: Outline mode 32+ if (!getenv ("PCMANFM_OUTLINE_MODE")) 33+ 34 cairo_paint (cr); 35 gdk_cairo_set_source_color(cr, &clr); 36 cairo_rectangle (cr, rect.x + 0.5, rect.y + 0.5, rect.width - 1, rect.height - 1); 37-- 382.17.1 39 40