Restore prior state correctly when leaving full screen mode
Previously we would always make the window windowed when leaving full screen mode. But this isn't the only possible state for the window to be in at the moment it entered full screen mode. Let's handle all of those states properly.
BUG: 467356 FIXED-IN: 23.04