Fixed display switching

Fixed switching between fullscreen and windowed modes