Is there a signal for when the main game window is resized?

Godot Version

4.4.1.stable

Question

I’m trying to figure out if there’s a signal that will trigger once a resize of the main game window is completed. Something akin to game_window.end_resize_drag()

I want to use this to internally set the size of the game window and save it to the settings later on. I’m not using predefined sizes. I let the user drag the sides and corners and I’d rather avoid checking at each frame. I think that would be overkill.

I’ve searched the docs and google, but there’s nothing I could find. I might be blind too. :sweat_smile:

The signal Viewport.size_changed covers over 95% of the scenarios, where you want to get informed when the size of a window is changed.

If that doesn’t work for you, here is a demo project, that covers the other use cases.

For how this can be potentially improved in the future, check here for reference: Notify users about window size changes · Issue #8788 · godotengine/godot-proposals · GitHub

Ah yes. It never occured to me to check that singleton. There are several and I don’t always recall them all.

I haven’t verified if it’s the solution, but I’m confident, so I’ll mark it so.

Thanks for the input, much appreciated.