From 4b1d2ee1067bf9572c874b137f65ac234d763805 Mon Sep 17 00:00:00 2001 From: Enrico Giordani Date: Tue, 22 Oct 2019 08:19:15 +0200 Subject: [PATCH] fix bug in multi monitor scenario (#528) the zone rect.X and rect.Y coordinates are relative to the current monitor. --- .../fancyzones/editor/FancyZonesEditor/CanvasZone.xaml.cs | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/src/modules/fancyzones/editor/FancyZonesEditor/CanvasZone.xaml.cs b/src/modules/fancyzones/editor/FancyZonesEditor/CanvasZone.xaml.cs index 0807844e91..d55b36bc45 100644 --- a/src/modules/fancyzones/editor/FancyZonesEditor/CanvasZone.xaml.cs +++ b/src/modules/fancyzones/editor/FancyZonesEditor/CanvasZone.xaml.cs @@ -66,9 +66,9 @@ namespace FancyZonesEditor Int32Rect rect = Model.Zones[ZoneIndex]; if (xDelta < 0) { - if ((rect.X + xDelta) < _settings.WorkArea.X) + if ((rect.X + xDelta) < 0) { - xDelta = _settings.WorkArea.X - rect.X; + xDelta = -rect.X; } } else if (xDelta > 0) @@ -81,9 +81,9 @@ namespace FancyZonesEditor if (yDelta < 0) { - if ((rect.Y + yDelta) < _settings.WorkArea.Y) + if ((rect.Y + yDelta) < 0) { - yDelta = _settings.WorkArea.Y - rect.Y; + yDelta = -rect.Y; } } else if (yDelta > 0)