From fdb772832f8804ec986a08c3489252c36356e954 Mon Sep 17 00:00:00 2001 From: scorpion-26 Date: Sun, 30 Apr 2023 00:39:09 +0200 Subject: [PATCH] Keep fullscreen mode in moveWindowToWorkspaceSafe (#2191) Moving a maximised window would always result in the window being fullscreen instead of maximised --- src/Compositor.cpp | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/src/Compositor.cpp b/src/Compositor.cpp index 414020b5c..9eda8e3b7 100644 --- a/src/Compositor.cpp +++ b/src/Compositor.cpp @@ -2348,7 +2348,8 @@ void CCompositor::moveWindowToWorkspaceSafe(CWindow* pWindow, CWorkspace* pWorks if (!pWindow || !pWorkspace) return; - const bool FULLSCREEN = pWindow->m_bIsFullscreen; + const bool FULLSCREEN = pWindow->m_bIsFullscreen; + const auto FULLSCREENMODE = getWorkspaceByID(pWindow->m_iWorkspaceID)->m_efFullscreenMode; if (FULLSCREEN) setWindowFullscreen(pWindow, false, FULLSCREEN_FULL); @@ -2374,5 +2375,5 @@ void CCompositor::moveWindowToWorkspaceSafe(CWindow* pWindow, CWorkspace* pWorks } if (FULLSCREEN) - setWindowFullscreen(pWindow, true, FULLSCREEN_FULL); + setWindowFullscreen(pWindow, true, FULLSCREENMODE); }