Skip to content

Commit d3ee2cc

Browse files
authored
Fix macOS/Linux fullscreen Spaces and disable live window resize (#185)
* Fix macOS fullscreen Spaces and disable manual window resize * Pass nullptr to SDL_SetWindowFullscreenMode to request Desktop Fullscreen (Spaces) instead of Exclusive mode, allowing trackpad gestures to work. * Remove SDL_WINDOW_RESIZABLE to prevent live window resizing (which distorts the DXVK swapchain) and to disable the native macOS green maximize button in windowed mode. * Restore SDL_WINDOW_RESIZABLE * Allows live window resizing and native maximize/minimize buttons to work as expected in windowed mode (-win). * Fullscreen Spaces support remains active due to the nullptr argument in W3DDisplay.
1 parent 134a794 commit d3ee2cc

2 files changed

Lines changed: 6 additions & 4 deletions

File tree

  • GeneralsMD/Code/GameEngineDevice/Source/W3DDevice/GameClient
  • Generals/Code/GameEngineDevice/Source/W3DDevice/GameClient

Generals/Code/GameEngineDevice/Source/W3DDevice/GameClient/W3DDisplay.cpp

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -516,8 +516,9 @@ static void SDL3_ApplyWindowModeForRenderConfig(Bool windowed, Int renderWidth,
516516
SDL_DisplayID displayId = SDL_GetDisplayForWindow(TheSDL3Window);
517517
const SDL_DisplayMode* mode = SDL_GetCurrentDisplayMode(displayId);
518518
if (mode) {
519-
if (!SDL_SetWindowFullscreenMode(TheSDL3Window, mode)) {
520-
fprintf(stderr, "WARNING: SDL_SetWindowFullscreenMode(native) failed: %s\n", SDL_GetError());
519+
// GeneralsX @bugfix MrMeeseeks 02/07/2026 Pass nullptr to request Desktop Fullscreen (Spaces) instead of Exclusive mode.
520+
if (!SDL_SetWindowFullscreenMode(TheSDL3Window, nullptr)) {
521+
fprintf(stderr, "WARNING: SDL_SetWindowFullscreenMode(nullptr) failed: %s\n", SDL_GetError());
521522
}
522523
}
523524
else {

GeneralsMD/Code/GameEngineDevice/Source/W3DDevice/GameClient/W3DDisplay.cpp

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -567,8 +567,9 @@ static void SDL3_ApplyWindowModeForRenderConfig(Bool windowed, Int renderWidth,
567567
SDL_DisplayID displayId = SDL_GetDisplayForWindow(TheSDL3Window);
568568
const SDL_DisplayMode* mode = SDL_GetCurrentDisplayMode(displayId);
569569
if (mode) {
570-
if (!SDL_SetWindowFullscreenMode(TheSDL3Window, mode)) {
571-
fprintf(stderr, "WARNING: SDL_SetWindowFullscreenMode(native) failed: %s\n", SDL_GetError());
570+
// GeneralsX @bugfix MrMeeseeks 02/07/2026 Pass nullptr to request Desktop Fullscreen (Spaces) instead of Exclusive mode.
571+
if (!SDL_SetWindowFullscreenMode(TheSDL3Window, nullptr)) {
572+
fprintf(stderr, "WARNING: SDL_SetWindowFullscreenMode(nullptr) failed: %s\n", SDL_GetError());
572573
}
573574
}
574575
else {

0 commit comments

Comments
 (0)