From eac55643421c95741fcb133370525386ae3afbc7 Mon Sep 17 00:00:00 2001 From: Hajime Hoshi Date: Wed, 3 Jan 2018 23:35:50 +0900 Subject: [PATCH] devicescale: Fix scaling on UNIX --- internal/devicescale/devicescale_unix.go | 14 +++++++++----- 1 file changed, 9 insertions(+), 5 deletions(-) diff --git a/internal/devicescale/devicescale_unix.go b/internal/devicescale/devicescale_unix.go index 4ab4fb807..ed43cc07e 100644 --- a/internal/devicescale/devicescale_unix.go +++ b/internal/devicescale/devicescale_unix.go @@ -65,11 +65,15 @@ func cinnamonScale() float64 { } func impl() float64 { - if s := gnomeScale(); s != 0 { - return s + scale := 0.0 + if s := gnomeScale(); s > scale { + scale = s } - if s := cinnamonScale(); s != 0 { - return s + if s := cinnamonScale(); s > scale { + scale = s } - return 1 + if scale == 0 { + return 1 + } + return scale }