Expand nullability context and mark a couple things nullable

This commit is contained in:
Brandon Thetford
2024-02-21 03:15:04 -07:00
parent 069ff05da2
commit 64488be380
2 changed files with 5 additions and 3 deletions

View File

@@ -1397,8 +1397,9 @@ public static partial class Application
UnGrabbedMouse?.Invoke (view, new ViewEventArgs (view));
}
#nullable enable
// Used by OnMouseEvent to track the last view that was clicked on.
internal static View _mouseEnteredView;
internal static View? _mouseEnteredView;
/// <summary>Event fired when a mouse move or click occurs. Coordinates are screen relative.</summary>
/// <remarks>
@@ -1410,7 +1411,6 @@ public static partial class Application
/// </remarks>
public static event EventHandler<MouseEventEventArgs> MouseEvent;
#nullable enable
/// <summary>Called when a mouse event occurs. Raises the <see cref="MouseEvent"/> event.</summary>
/// <remarks>This method can be used to simulate a mouse event, e.g. in unit tests.</remarks>
/// <param name="a">The mouse event with coordinates relative to the screen.</param>

View File

@@ -38,11 +38,12 @@ public static partial class Application
}
}
#nullable enable
/// <summary>
/// The <see cref="Toplevel"/> object used for the application on startup which
/// <see cref="Toplevel.IsOverlappedContainer"/> is true.
/// </summary>
public static Toplevel OverlappedTop
public static Toplevel? OverlappedTop
{
get
{
@@ -54,6 +55,7 @@ public static partial class Application
return null;
}
}
#nullable restore
/// <summary>Brings the superview of the most focused overlapped view is on front.</summary>
public static void BringOverlappedTopToFront ()