aboutsummaryrefslogtreecommitdiffhomepage
diff options
context:
space:
mode:
authorlittleblack111 <[email protected]>2024-12-11 04:09:47 +0800
committerGitHub <[email protected]>2024-12-10 21:09:47 +0100
commitd94d8b4ab26a8691a70922f43512f0484c086d85 (patch)
treea2a8a45b032102d27909c5cfb5a6483f7d106979
parentbb5c3f27023e0702642b72d1869427b9b0ff72e0 (diff)
downloadHyprland-d94d8b4ab26a8691a70922f43512f0484c086d85.tar.gz
Hyprland-d94d8b4ab26a8691a70922f43512f0484c086d85.zip
windows: allow replacing existing fullscreen (#8566)
* feat: `binds:allow_replace_fullscreen` this allows replacement of fullscreen window(i.e. fullscreening another window when one is already fullscreened on the workspace) this is used when a floating window that is spawned on top of a fullscreen wanted to be fullscreened * clang-format * remove: config for `allow_replace_fullscreen`
-rw-r--r--src/Compositor.cpp5
1 files changed, 4 insertions, 1 deletions
diff --git a/src/Compositor.cpp b/src/Compositor.cpp
index c5aa025a..f341f9e7 100644
--- a/src/Compositor.cpp
+++ b/src/Compositor.cpp
@@ -2277,7 +2277,10 @@ void CCompositor::setWindowFullscreenState(const PHLWINDOW PWINDOW, SFullscreenS
PWINDOW->m_bPinFullscreened = true;
}
- const bool CHANGEINTERNAL = !(PWINDOW->m_bPinned || CURRENT_EFFECTIVE_MODE == EFFECTIVE_MODE || (PWORKSPACE->m_bHasFullscreenWindow && !PWINDOW->isFullscreen()));
+ if (PWORKSPACE->m_bHasFullscreenWindow && !PWINDOW->isFullscreen())
+ setWindowFullscreenInternal(PWORKSPACE->getFullscreenWindow(), FSMODE_NONE);
+
+ const bool CHANGEINTERNAL = !(PWINDOW->m_bPinned || CURRENT_EFFECTIVE_MODE == EFFECTIVE_MODE);
if (*PALLOWPINFULLSCREEN && PWINDOW->m_bPinFullscreened && PWINDOW->isFullscreen() && !PWINDOW->m_bPinned && state.internal == FSMODE_NONE) {
PWINDOW->m_bPinned = true;