From d2a9c985c8a11c2cff6f069371994d9d039b19b7 Mon Sep 17 00:00:00 2001 From: littleblack111 Date: Wed, 20 Nov 2024 23:53:23 +0800 Subject: [PATCH] fix: conditions for only fullscreen not other stuff in the `eFullscreenMode` like maxiumize(fullscreenstate 1) --- src/Compositor.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/Compositor.cpp b/src/Compositor.cpp index 2c658e16..8c92cf00 100644 --- a/src/Compositor.cpp +++ b/src/Compositor.cpp @@ -2353,14 +2353,14 @@ void CCompositor::setWindowFullscreenState(const PHLWINDOW PWINDOW, sFullscreenS const eFullscreenMode CURRENT_EFFECTIVE_MODE = (eFullscreenMode)std::bit_floor((uint8_t)PWINDOW->m_sFullscreenState.internal); const eFullscreenMode EFFECTIVE_MODE = (eFullscreenMode)std::bit_floor((uint8_t)state.internal); - if (*PALLOWPINFULLSCREEN && !PWINDOW->m_bPinFullscreened && PWINDOW->m_bPinned && !PWINDOW->isFullscreen()) { + if (*PALLOWPINFULLSCREEN && !PWINDOW->m_bPinFullscreened && PWINDOW->m_bPinned && PWINDOW->m_sFullscreenState.internal != FSMODE_FULLSCREEN) { PWINDOW->m_bPinned = false; PWINDOW->m_bPinFullscreened = true; } const bool CHANGEINTERNAL = !(PWINDOW->m_bPinned || CURRENT_EFFECTIVE_MODE == EFFECTIVE_MODE || (PWORKSPACE->m_bHasFullscreenWindow && !PWINDOW->isFullscreen())); - if (*PALLOWPINFULLSCREEN && PWINDOW->m_bPinFullscreened && !PWINDOW->m_bPinned && PWINDOW->isFullscreen()) { + if (*PALLOWPINFULLSCREEN && PWINDOW->m_bPinFullscreened && !PWINDOW->m_bPinned && PWINDOW->m_sFullscreenState.internal == FSMODE_FULLSCREEN) { PWINDOW->m_bPinned = true; PWINDOW->m_bPinFullscreened = false; }