Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -90,7 +90,7 @@ private void OnPostProcessInput(object sender, ProcessInputEventArgs e)
if (directlyOver != null)
{
// Process the mouse move
OnMouseMove(directlyOver, mouseReport);
OnMouseMove(directlyOver);
}
}
}
Expand Down Expand Up @@ -139,9 +139,9 @@ private void OnPostProcessInput(object sender, ProcessInputEventArgs e)
}
}

private void OnMouseMove(IInputElement directlyOver, RawMouseInputReport mouseReport)
private void OnMouseMove(IInputElement directlyOver)
{
if (MouseHasLeftSafeArea(mouseReport))
if (MouseHasLeftSafeArea())
{
DismissCurrentToolTip();
}
Expand Down Expand Up @@ -883,7 +883,7 @@ private void SetSafeArea(ToolTip tooltip)
}
}

private bool MouseHasLeftSafeArea(RawMouseInputReport mouseReport)
private bool MouseHasLeftSafeArea()
{
// if there is no SafeArea, the mouse didn't leave it
if (SafeArea == null)
Expand All @@ -897,7 +897,7 @@ private bool MouseHasLeftSafeArea(RawMouseInputReport mouseReport)
return true;

// if the safe area is valid, see if it still contains the mouse point
return !SafeArea.ContainsPoint(mouseReport.InputSource, mouseReport.X, mouseReport.Y);
return !(SafeArea?.ContainsMousePoint() ?? true);
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

In light of the null check at 889, you can simplify this to

    return !SafeArea.ContainsMousePoint();

}

private ConvexHull SafeArea { get; set; }
Expand Down