Fix a bug where fullscreen can still be 'maximized' before it returns to windowed mode.