public override void EnterFullScreen()
{
// Changing window style forces a redraw. Some games
// have fail-logic and toggle fullscreen in their draw function,
// so temporarily become inactive so it won't execute.
SuspendUpdatingAndDrawing();
try
{
// I will leave this here just in case someone can figure out
// how to do a full screen with this and still get Alt + Tab to
// friggin work.
//_mainWindow.ContentView.EnterFullscreenModeWithOptions(NSScreen.MainScreen,new NSDictionary());
_wasResizeable = AllowUserResizing;
string oldTitle = _gameWindow.Title;
NSMenu.MenuBarVisible = false;
_mainWindow.StyleMask = NSWindowStyle.Borderless;
// Set the level here to normal
_mainWindow.Level = NSWindowLevel.Floating;
if (oldTitle != null)
_gameWindow.Title = oldTitle;
_mainWindow.IsVisible = false;
// FIXME: EnterFullScreen gets called very early and interferes
// with Synchronous mode, so disabling this for now.
// Hopefully this does not cause excessive havoc.
//_mainWindow.MakeKeyAndOrderFront(Window);
ResetWindowBounds();
_mainWindow.HidesOnDeactivate = true;
_gameWindow.MouseState.LeftButton = ButtonState.Released;
_gameWindow.MouseState.RightButton = ButtonState.Released;
_gameWindow.MouseState.MiddleButton = ButtonState.Released;
}
finally { ResumeUpdatingAndDrawing(); }
}