소스 검색

Revert "cocoa: Don't re-enter a fullscreen space if leaving to enter an exclusive mode"

This reverts commit 07b9e86d0291cd01ee84617eb6e5a601256f0368.

It turns out that the problem is elsewhere, related to needing to block mode changes until spaces transitions are complete.
Frank Praznik 1 개월 전
부모
커밋
09356c709a
1개의 변경된 파일2개의 추가작업 그리고 8개의 파일을 삭제
  1. 2 8
      src/video/SDL_video.c

+ 2 - 8
src/video/SDL_video.c

@@ -1917,15 +1917,11 @@ bool SDL_UpdateFullscreenMode(SDL_Window *window, SDL_FullscreenOp fullscreen, b
             goto done;
         }
         if (commit) {
-            bool skip_spaces_switch = false;
             // If we're switching between a fullscreen Space and exclusive fullscreen, we need to get back to normal first.
             if (fullscreen && Cocoa_IsWindowInFullscreenSpace(window) && !window->last_fullscreen_exclusive_display && window->fullscreen_exclusive) {
                 if (!Cocoa_SetWindowFullscreenSpace(window, false, true)) {
                     goto error;
                 }
-
-                // We just left spaces to go to an exclusive mode, so don't try to re-enter.
-                skip_spaces_switch = true;
             } else if (fullscreen && window->last_fullscreen_exclusive_display && !window->fullscreen_exclusive) {
                 for (i = 0; i < _this->num_displays; ++i) {
                     SDL_VideoDisplay *last_display = _this->displays[i];
@@ -1939,10 +1935,8 @@ bool SDL_UpdateFullscreenMode(SDL_Window *window, SDL_FullscreenOp fullscreen, b
                 }
             }
 
-            if (!skip_spaces_switch) {
-                if (Cocoa_SetWindowFullscreenSpace(window, !!fullscreen, syncHint)) {
-                    goto done;
-                }
+            if (Cocoa_SetWindowFullscreenSpace(window, !!fullscreen, syncHint)) {
+                goto done;
             }
         }
     }