Skip to content

Commit

Permalink
fix bug in multi monitor scenario (#528)
Browse files Browse the repository at this point in the history
the zone rect.X and rect.Y coordinates are relative to the current monitor.
  • Loading branch information
enricogior committed Oct 22, 2019
1 parent a07a426 commit 4b1d2ee
Showing 1 changed file with 4 additions and 4 deletions.
Expand Up @@ -66,9 +66,9 @@ private void SizeMove(double xDelta, double yDelta)
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)
Expand All @@ -81,9 +81,9 @@ private void SizeMove(double xDelta, double yDelta)

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)
Expand Down

0 comments on commit 4b1d2ee

Please sign in to comment.