From 5060b4dfe396d7832f579eeef6d0d538ce830ccd Mon Sep 17 00:00:00 2001 From: Ethan Lee Date: Mon, 5 Apr 2021 11:07:32 -0400 Subject: [PATCH] Only do focus fullscreen toggling on X11. I haven't been able to reproduce this old thing on any setup I have. The patch from 2013 was originally for X11, and Wayland's fullscreen doesn't allow for this sort of thing, so let's start scoping this down for eventual removal when X11 is finally out of our minds forever. --- desktop_version/src/KeyPoll.cpp | 15 ++------------- desktop_version/src/KeyPoll.h | 1 - 2 files changed, 2 insertions(+), 14 deletions(-) diff --git a/desktop_version/src/KeyPoll.cpp b/desktop_version/src/KeyPoll.cpp index b22467b2..5d152171 100644 --- a/desktop_version/src/KeyPoll.cpp +++ b/desktop_version/src/KeyPoll.cpp @@ -43,17 +43,6 @@ KeyPoll::KeyPoll(void) resetWindow = 0; pressedbackspace=false; - useFullscreenSpaces = false; - if (SDL_strcmp(SDL_GetPlatform(), "Mac OS X") == 0) - { - useFullscreenSpaces = true; - const char *hint = SDL_GetHint(SDL_HINT_VIDEO_MAC_FULLSCREEN_SPACES); - if (hint != NULL) - { - useFullscreenSpaces = (SDL_strcmp(hint, "1") == 0); - } - } - linealreadyemptykludge = false; isActive = true; @@ -288,7 +277,7 @@ void KeyPoll::Poll(void) music.resume(); music.resumeef(); } - if (!useFullscreenSpaces) + if (SDL_strcmp(SDL_GetCurrentVideoDriver(), "x11") == 0) { if (wasFullscreen) { @@ -308,7 +297,7 @@ void KeyPoll::Poll(void) music.pause(); music.pauseef(); } - if (!useFullscreenSpaces) + if (SDL_strcmp(SDL_GetCurrentVideoDriver(), "x11") == 0) { wasFullscreen = !graphics.screenbuffer->isWindowed; graphics.screenbuffer->isWindowed = true; diff --git a/desktop_version/src/KeyPoll.h b/desktop_version/src/KeyPoll.h index b8851b46..1af5ed9c 100644 --- a/desktop_version/src/KeyPoll.h +++ b/desktop_version/src/KeyPoll.h @@ -72,7 +72,6 @@ private: std::map controllers; std::map buttonmap; int xVel, yVel; - bool useFullscreenSpaces; Uint32 wasFullscreen; };