mirror of
https://github.com/hyprwm/Hyprland
synced 2024-11-22 16:46:00 +01:00
keybinds: Fix fullscreenState toggling behaviour (#7288)
* Update fullscreen state dispatcher behaviour * Change syncFullscreen default to false * Revert all changes * Modify fullscreenstate dispatcher toggle behaviour * Update syncFullscreen according to state * Update syncFullscreen before setting fullscreen state
This commit is contained in:
parent
3fa6db1e7a
commit
c7b72790bd
1 changed files with 4 additions and 5 deletions
|
@ -1166,6 +1166,8 @@ void CKeybindManager::fullscreenStateActive(std::string args) {
|
|||
if (!PWINDOW)
|
||||
return;
|
||||
|
||||
PWINDOW->m_sWindowData.syncFullscreen = CWindowOverridableVar(false, PRIORITY_SET_PROP);
|
||||
|
||||
int internalMode, clientMode;
|
||||
try {
|
||||
internalMode = std::stoi(ARGS[0]);
|
||||
|
@ -1184,18 +1186,15 @@ void CKeybindManager::fullscreenStateActive(std::string args) {
|
|||
}
|
||||
|
||||
if (internalMode != -1 && clientMode == -1 && PWINDOW->m_sFullscreenState.internal == STATE.internal) {
|
||||
g_pCompositor->setWindowFullscreenState(PWINDOW, sFullscreenState{.internal = PWINDOW->m_sFullscreenState.client, .client = PWINDOW->m_sFullscreenState.client});
|
||||
PWINDOW->m_sWindowData.syncFullscreen = CWindowOverridableVar(true, PRIORITY_SET_PROP);
|
||||
g_pCompositor->setWindowFullscreenState(PWINDOW, sFullscreenState{.internal = FSMODE_NONE, .client = PWINDOW->m_sFullscreenState.client});
|
||||
return;
|
||||
}
|
||||
|
||||
if (internalMode == -1 && clientMode != -1 && PWINDOW->m_sFullscreenState.client == STATE.client) {
|
||||
g_pCompositor->setWindowFullscreenState(PWINDOW, sFullscreenState{.internal = PWINDOW->m_sFullscreenState.internal, .client = PWINDOW->m_sFullscreenState.internal});
|
||||
PWINDOW->m_sWindowData.syncFullscreen = CWindowOverridableVar(true, PRIORITY_SET_PROP);
|
||||
g_pCompositor->setWindowFullscreenState(PWINDOW, sFullscreenState{.internal = PWINDOW->m_sFullscreenState.internal, .client = FSMODE_NONE});
|
||||
return;
|
||||
}
|
||||
|
||||
PWINDOW->m_sWindowData.syncFullscreen = CWindowOverridableVar(false, PRIORITY_SET_PROP);
|
||||
g_pCompositor->setWindowFullscreenState(PWINDOW, STATE);
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in a new issue