mirror of
https://github.com/hyprwm/Hyprland
synced 2024-11-14 05:05:59 +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)
|
if (!PWINDOW)
|
||||||
return;
|
return;
|
||||||
|
|
||||||
|
PWINDOW->m_sWindowData.syncFullscreen = CWindowOverridableVar(false, PRIORITY_SET_PROP);
|
||||||
|
|
||||||
int internalMode, clientMode;
|
int internalMode, clientMode;
|
||||||
try {
|
try {
|
||||||
internalMode = std::stoi(ARGS[0]);
|
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) {
|
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});
|
g_pCompositor->setWindowFullscreenState(PWINDOW, sFullscreenState{.internal = FSMODE_NONE, .client = PWINDOW->m_sFullscreenState.client});
|
||||||
PWINDOW->m_sWindowData.syncFullscreen = CWindowOverridableVar(true, PRIORITY_SET_PROP);
|
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (internalMode == -1 && clientMode != -1 && PWINDOW->m_sFullscreenState.client == STATE.client) {
|
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});
|
g_pCompositor->setWindowFullscreenState(PWINDOW, sFullscreenState{.internal = PWINDOW->m_sFullscreenState.internal, .client = FSMODE_NONE});
|
||||||
PWINDOW->m_sWindowData.syncFullscreen = CWindowOverridableVar(true, PRIORITY_SET_PROP);
|
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
PWINDOW->m_sWindowData.syncFullscreen = CWindowOverridableVar(false, PRIORITY_SET_PROP);
|
|
||||||
g_pCompositor->setWindowFullscreenState(PWINDOW, STATE);
|
g_pCompositor->setWindowFullscreenState(PWINDOW, STATE);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue