[rcore][desktop_glfw] Set AUTO_ICONIFY flag to false per default #4188
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Previously
AUTO_ICONIFY
was only disabled if the user requested a Fullscreen window from the start. After that, changing this behavior on the user side was impossible, even when changing to a Fullscreen window.The
AUTO_ICONIFY
causes problems on macOS. On macOS, if the window is minimized because ofAUTO_ICONIFY
then the only way to restore it is to click on the icon in the dock. In other words, whenAUTO_ICONIFY
is enabled alt/cmd-tabbing through Windows does not work correctly. On Windows, it works even whenAUTO_ICONIFY
is enabled.Additionally, if a raylib window is in Fullscreen mode on another monitor the
AUTO_ICONIFY
behavior is a problem because the user might want the window to stay on the monitor even if it loses focus. (problem on all OS's)AUTO_ICONIFY
also restores the monitor hardware resolution if a fullscreen window loses focus. (is a good thing mostly but causes an issue with multiple monitors, see point above)I set it to false per default on all operating systems to maintain consistency. The
AUTO_ICONIFY
behavior can be implemented by the user if needed:If wanted/needed there are some other options to go about this:
AUTO_ICONIFY
flag to false per default on macOS. (this creates problems because the behavior is different on different platforms but has the advantage that nothing changes for Windows/Linux users)AUTO_ICONIFY
flag on the user side (like with other flags but I don't know how other backends handle this behavior)AUTO_ICONIFY
is set to false per default and it is only set to true whenever fullscreen mode is activated. It is set to false again once fullscreen is exited.Another example that just caused me problems with the
AUTO_ICONIFY
flag on Windows:I wanted to make a screenshot of a raylib window for another PR using the Snipping Tool app. With the
AUTO_ICONIFY
flag enabled I could not do that because every time I focused the window of the snipping tool to make a screenshot the raylib window automatically minimized... So I am really for just disabling it.