diff --git a/Terminal.Gui/Application.cs b/Terminal.Gui/Application.cs
index ca0ba9cb9..ad40aebe9 100644
--- a/Terminal.Gui/Application.cs
+++ b/Terminal.Gui/Application.cs
@@ -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;
/// Event fired when a mouse move or click occurs. Coordinates are screen relative.
///
@@ -1410,7 +1411,6 @@ public static partial class Application
///
public static event EventHandler MouseEvent;
- #nullable enable
/// Called when a mouse event occurs. Raises the event.
/// This method can be used to simulate a mouse event, e.g. in unit tests.
/// The mouse event with coordinates relative to the screen.
diff --git a/Terminal.Gui/Views/ToplevelOverlapped.cs b/Terminal.Gui/Views/ToplevelOverlapped.cs
index 864882b9c..a1142b5df 100644
--- a/Terminal.Gui/Views/ToplevelOverlapped.cs
+++ b/Terminal.Gui/Views/ToplevelOverlapped.cs
@@ -38,11 +38,12 @@ public static partial class Application
}
}
+ #nullable enable
///
/// The object used for the application on startup which
/// is true.
///
- public static Toplevel OverlappedTop
+ public static Toplevel? OverlappedTop
{
get
{
@@ -54,6 +55,7 @@ public static partial class Application
return null;
}
}
+ #nullable restore
/// Brings the superview of the most focused overlapped view is on front.
public static void BringOverlappedTopToFront ()