# Strategies ## Fullscreen ## Mouse Capture ## Focus ```python extends Node func _ready(): get_viewport().focus_entered.connect(_on_window_focus_in) get_viewport().focus_exited.connect(_on_window_focus_out) func _on_window_focus_in(): print("Window has gained focus.") func _on_window_focus_out(): print("Window has lost focus.") ``` See also: [[Godot - Notifications]] ## Get Resolution ### Screen ```python DisplayServer.screen_get_size() ``` ### Viewport ```python get_viewport_rect().size ``` ## Moving Windows Using the `DisplayServer` to set window positions may work better than setting the position via the `Viewport` or `Window` object. I was ```python DisplayServer.window_set_position() ``` # References - https://docs.godotengine.org/en/stable/tutorials/rendering/multiple_resolutions.html - https://www.reddit.com/r/godot/comments/1aqnnhl/how_do_i_detect_if_the_game_is_not_in_focus/ - https://www.reddit.com/r/godot/comments/7uwl68/godot_3_how_do_i_get_screen_resolution_from/