Skip to content

Commit 3163e0c

Browse files
committed
Revert "cocoa: Don't re-enter a fullscreen space if leaving to enter an exclusive mode"
This reverts commit ee8f286. It turns out that the problem is elsewhere, related to needing to block mode changes until spaces transitions are complete.
1 parent b6fa89e commit 3163e0c

File tree

1 file changed

+2
-8
lines changed

1 file changed

+2
-8
lines changed

src/video/SDL_video.c

Lines changed: 2 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -1927,15 +1927,11 @@ bool SDL_UpdateFullscreenMode(SDL_Window *window, SDL_FullscreenOp fullscreen, b
19271927
goto done;
19281928
}
19291929
if (commit) {
1930-
bool skip_spaces_switch = false;
19311930
// If we're switching between a fullscreen Space and exclusive fullscreen, we need to get back to normal first.
19321931
if (fullscreen && Cocoa_IsWindowInFullscreenSpace(window) && !window->last_fullscreen_exclusive_display && window->fullscreen_exclusive) {
19331932
if (!Cocoa_SetWindowFullscreenSpace(window, false, true)) {
19341933
goto error;
19351934
}
1936-
1937-
// We just left spaces to go to an exclusive mode, so don't try to re-enter.
1938-
skip_spaces_switch = true;
19391935
} else if (fullscreen && window->last_fullscreen_exclusive_display && !window->fullscreen_exclusive) {
19401936
for (i = 0; i < _this->num_displays; ++i) {
19411937
SDL_VideoDisplay *last_display = _this->displays[i];
@@ -1949,10 +1945,8 @@ bool SDL_UpdateFullscreenMode(SDL_Window *window, SDL_FullscreenOp fullscreen, b
19491945
}
19501946
}
19511947

1952-
if (!skip_spaces_switch) {
1953-
if (Cocoa_SetWindowFullscreenSpace(window, !!fullscreen, syncHint)) {
1954-
goto done;
1955-
}
1948+
if (Cocoa_SetWindowFullscreenSpace(window, !!fullscreen, syncHint)) {
1949+
goto done;
19561950
}
19571951
}
19581952
}

0 commit comments

Comments
 (0)