Is there a signal for maximizing a window?

:information_source: Attention Topic was automatically imported from the old Question2Answer platform.
:bust_in_silhouette: Asked By senshellshark

I have this code:

func _ready():
  get_tree().get_root().connect("size_changed", self, "screen_resize")

which works nicely for any resizing of the window except in the case of maximizing either by the maximize button or moving the window to the edges of the screen and sticking it there. I would like to have such a signal or event use the same method as size_changed. Is there such a signal already in Godot or would I have to make my own?

:bust_in_silhouette: Reply From: DaddyMonster

Yeah, size change is on scaling. You probably need a separate branch to handle that based on a check of OS.window_fullscreen - if it’s not equal to itself and you’ll need to make a member variable to handle the state.

So yes, I think you need to make your own signal.