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`
This commit is contained in:
littleblack111 2024-12-11 04:09:47 +08:00 committed by GitHub
parent bb5c3f2702
commit d94d8b4ab2
No known key found for this signature in database
GPG key ID: B5690EEEBB952194

View file

@ -2277,7 +2277,10 @@ void CCompositor::setWindowFullscreenState(const PHLWINDOW PWINDOW, SFullscreenS
PWINDOW->m_bPinFullscreened = true; 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) { if (*PALLOWPINFULLSCREEN && PWINDOW->m_bPinFullscreened && PWINDOW->isFullscreen() && !PWINDOW->m_bPinned && state.internal == FSMODE_NONE) {
PWINDOW->m_bPinned = true; PWINDOW->m_bPinned = true;