From 14bf230d76a1eae6b6ea54a938a991a9f2632750 Mon Sep 17 00:00:00 2001 From: "J?rgen P. Tjern?" Date: Mon, 12 Aug 2013 11:09:13 -0700 Subject: [PATCH] Mac: Fix restoring of Cmd-H-hidden fullscreen desktop windows. This should fix http://bugzilla.libsdl.org/show_bug.cgi?id=1996 --- src/video/cocoa/SDL_cocoawindow.m | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/src/video/cocoa/SDL_cocoawindow.m b/src/video/cocoa/SDL_cocoawindow.m index 9cee4d3ba1328..cd4771d44150a 100644 --- a/src/video/cocoa/SDL_cocoawindow.m +++ b/src/video/cocoa/SDL_cocoawindow.m @@ -1047,9 +1047,11 @@ - (void)resetCursorRects [nswindow setLevel:kCGNormalWindowLevel]; } - [data->listener pauseVisibleObservation]; - [nswindow makeKeyAndOrderFront:nil]; - [data->listener resumeVisibleObservation]; + if ([nswindow isVisible] || fullscreen) { + [data->listener pauseVisibleObservation]; + [nswindow makeKeyAndOrderFront:nil]; + [data->listener resumeVisibleObservation]; + } ScheduleContextUpdates(data);