diff --git a/hw/xquartz/X11Controller.m b/hw/xquartz/X11Controller.m index 01526b7d0..3de4e139d 100644 --- a/hw/xquartz/X11Controller.m +++ b/hw/xquartz/X11Controller.m @@ -773,6 +773,13 @@ objectValueForTableColumn:(NSTableColumn *)tableColumn row:(NSInteger)row - (void) applicationDidHide:(NSNotification *)notify { DarwinSendDDXEvent(kXquartzControllerNotify, 1, AppleWMHideAll); + + /* Toggle off fullscreen mode to leave our non-default video + * mode and hide our guard window. + */ + if (!XQuartzIsRootless && XQuartzFullscreenVisible) { + DarwinSendDDXEvent(kXquartzToggleFullscreen, 0); + } } - (void) applicationDidUnhide:(NSNotification *)notify