Skip to content

Commit

Permalink
Fix: Fix the issue where the mask displays abnormally when the mouse …
Browse files Browse the repository at this point in the history
…starts clicking on the auxiliary line screenshot
  • Loading branch information
ZGGSONG committed Aug 7, 2024
1 parent 4553cc7 commit 6dd158f
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 3 deletions.
2 changes: 1 addition & 1 deletion src/ScreenGrab/ScreenGrab.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@
</ItemGroup>

<PropertyGroup Label="Nuget">
<Version>1.0.2</Version>
<Version>1.0.3</Version>
<Title>ScreenGrab</Title>
<Description>ScreenGrab extracted from Text-Grab</Description>
<PackageReadmeFile>README.md</PackageReadmeFile>
Expand Down
6 changes: 4 additions & 2 deletions src/ScreenGrab/ScreenGrabView.xaml.cs
Original file line number Diff line number Diff line change
Expand Up @@ -208,7 +208,6 @@ private void RegionClickCanvas_MouseDown(object sender, MouseButtonEventArgs e)
}

_isSelecting = true;
// Hide the lines
SetAuxiliaryVisibility(false);
RegionClickCanvas.CaptureMouse();
CursorClipper.ClipCursor(this);
Expand All @@ -232,7 +231,10 @@ private void RegionClickCanvas_MouseDown(object sender, MouseButtonEventArgs e)
_ = RegionClickCanvas.Children.Add(_selectBorder);
Canvas.SetLeft(_selectBorder, _clickedPoint.X);
Canvas.SetTop(_selectBorder, _clickedPoint.Y);


// Initialize ClippingGeometry.Rect with a valid Rect
ClippingGeometry.Rect = new Rect(_clickedPoint, new Size(0, 0));

WindowUtilities.GetMousePosition(out var mousePoint);
foreach (var screen in DisplayInfo.AllDisplayInfos)
{
Expand Down

0 comments on commit 6dd158f

Please sign in to comment.