mirror of
https://github.com/gui-cs/Terminal.Gui.git
synced 2026-01-02 01:03:29 +01:00
In-line this, which is only used once
The zero checks are redundant. If the point is not inside the rectangle, it isn't inside the rectangle, period.
This commit is contained in:
@@ -1460,7 +1460,7 @@ public static partial class Application
|
|||||||
View = view
|
View = view
|
||||||
};
|
};
|
||||||
|
|
||||||
if (OutsideRect (new Point (nme.X, nme.Y), MouseGrabView.Bounds))
|
if (MouseGrabView.Bounds.Contains (nme.X, nme.Y) is false)
|
||||||
{
|
{
|
||||||
// The mouse has moved outside the bounds of the the view that
|
// The mouse has moved outside the bounds of the the view that
|
||||||
// grabbed the mouse, so we tell the view that last got
|
// grabbed the mouse, so we tell the view that last got
|
||||||
@@ -1623,8 +1623,6 @@ public static partial class Application
|
|||||||
|
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
|
||||||
static bool OutsideRect (Point p, Rectangle r) { return p.X < 0 || p.X > r.Right || p.Y < 0 || p.Y > r.Bottom; }
|
|
||||||
}
|
}
|
||||||
#nullable restore
|
#nullable restore
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user