From 41fc6e3b949eefdc2b20afce69d62541ce6a00b4 Mon Sep 17 00:00:00 2001 From: Antoine Martin Date: Mon, 25 Jun 2018 04:08:43 +0000 Subject: [PATCH] always call restore if we called save beforehand git-svn-id: https://xpra.org/svn/Xpra/trunk@19705 3bb7dfac-3a0b-4e04-842a-767bc560f471 --- src/xpra/client/gtk_base/cairo_backing_base.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/xpra/client/gtk_base/cairo_backing_base.py b/src/xpra/client/gtk_base/cairo_backing_base.py index a080aed4e6..79011849b2 100644 --- a/src/xpra/client/gtk_base/cairo_backing_base.py +++ b/src/xpra/client/gtk_base/cairo_backing_base.py @@ -116,10 +116,10 @@ def cairo_paint_from_source(self, set_source_fn, source, x, y, w, h, options): gc.rectangle(0, 0, w, h) set_source_fn(gc, source, 0, 0) gc.paint() - if self.paint_box_line_width and options: + if self.paint_box_line_width: gc.restore() encoding = options.get("encoding") - if encoding: + if options and encoding: color = get_paint_box_color(encoding) gc.set_line_width(self.paint_box_line_width) gc.set_source_rgba(*color)