Skip to content

Commit

Permalink
Merge pull request #17 from sneusse/master
Browse files Browse the repository at this point in the history
Fixed offsets when dragging with taskbar right/left
  • Loading branch information
PWagner1 authored Aug 12, 2020
2 parents ded4de5 + 6d07241 commit 6600110
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -84,7 +84,9 @@ public Rectangle SolidRect
if (_solidRect != value)
{
_solidRect = value;
DesktopBounds = _solidRect;
var area = Screen.GetWorkingArea(this);
var bounds = new Rectangle(value.Location - (Size) area.Location, value.Size);
DesktopBounds = bounds;
Refresh();
}
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -1387,7 +1387,10 @@ private Rectangle SplitRectangleFromPoint(Point pt, int length)
splitRectangle = new Rectangle(_separatorBox.X, pt.Y, Target.ClientWidth, length);
}

return _source.SeparatorControl.RectangleToScreen(splitRectangle);
var rect = _source.SeparatorControl.RectangleToScreen(splitRectangle);
var area = Screen.GetWorkingArea(rect);
rect = new Rectangle(rect.Location - (Size) area.Location, rect.Size);
return rect;
}

private void RegisterFilter()
Expand Down

0 comments on commit 6600110

Please sign in to comment.