From d94d8b4ab26a8691a70922f43512f0484c086d85 Mon Sep 17 00:00:00 2001 From: littleblack111 Date: Wed, 11 Dec 2024 04:09:47 +0800 Subject: [PATCH] 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` --- src/Compositor.cpp | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) 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;