Could you make F full screen? I think you can just use DisplayServer.WINDOW_MODE_FULLSCREEN and WINDOW_MODE_WINDOWED.