keybinds: allow toggling fullscreenstate (#7128)

modified:   src/managers/KeybindManager.cpp
This commit is contained in:
MightyPlaza 2024-08-01 09:43:32 +00:00 committed by GitHub
parent 8c02b3c267
commit 95959789b7
No known key found for this signature in database
GPG key ID: B5690EEEBB952194

View file

@ -1174,9 +1174,13 @@ void CKeybindManager::fullscreenStateActive(std::string args) {
clientMode = std::stoi(ARGS[1]); clientMode = std::stoi(ARGS[1]);
} catch (std::exception& e) { clientMode = -1; } } catch (std::exception& e) { clientMode = -1; }
g_pCompositor->setWindowFullscreenState(PWINDOW, const sFullscreenState STATE = sFullscreenState{.internal = (internalMode != -1 ? (eFullscreenMode)internalMode : PWINDOW->m_sFullscreenState.internal),
sFullscreenState{.internal = (internalMode != -1 ? (eFullscreenMode)internalMode : PWINDOW->m_sFullscreenState.internal), .client = (clientMode != -1 ? (eFullscreenMode)clientMode : PWINDOW->m_sFullscreenState.client)};
.client = (clientMode != -1 ? (eFullscreenMode)clientMode : PWINDOW->m_sFullscreenState.client)});
if (PWINDOW->m_sFullscreenState.internal == STATE.internal && PWINDOW->m_sFullscreenState.client == STATE.client)
g_pCompositor->setWindowFullscreenState(PWINDOW, sFullscreenState{.internal = FSMODE_NONE, .client = FSMODE_NONE});
else
g_pCompositor->setWindowFullscreenState(PWINDOW, STATE);
} }
void CKeybindManager::moveActiveToWorkspace(std::string args) { void CKeybindManager::moveActiveToWorkspace(std::string args) {