Incomplete patch that hides windows during our exit process to make
it feel a bit snappier and responsive when closing.
If you launch blender and load an existing file, then make some small change (move something), then quit. At the prompt to save just say "no". At that point we are closing when we have undo items which means we save an "undo.blend" file.
There have been some grumbles (T91452) that when this file is large the user is left staring at a grey and unresponsive screen while it saves. It does annoy users to force them to stare at a blank screen after closing. It makes the program seem wonky, heavy, or bloated. You've dismissed it and it is taking longer than necessary to get out of the way. So the following patch just HIDES the windows first so it feels a lot snappier, less bloaty. Just gets out of the way immediately and does its thing in the background.
It should work as advertised for Windows and SDL (although untested), but only has TODO comments for X11, Wayland, and Mac - although should do no harm on those platforms, they just won't hide the windows.