From 2b99dbb4463e864cda7dd421eca2b2abdd64ef60 Mon Sep 17 00:00:00 2001 From: vaxerski Date: Wed, 21 Sep 2022 14:16:13 +0100 Subject: [PATCH] better cycling in fullscreen with pinned --- src/managers/KeybindManager.cpp | 14 ++++++++++---- 1 file changed, 10 insertions(+), 4 deletions(-) diff --git a/src/managers/KeybindManager.cpp b/src/managers/KeybindManager.cpp index 22edc5ea..e95ab94c 100644 --- a/src/managers/KeybindManager.cpp +++ b/src/managers/KeybindManager.cpp @@ -962,11 +962,14 @@ void CKeybindManager::moveFocusTo(std::string args) { if (PLASTWINDOW->m_iWorkspaceID == PWINDOWTOCHANGETO->m_iWorkspaceID && PLASTWINDOW->m_bIsFullscreen) { const auto PWORKSPACE = g_pCompositor->getWorkspaceByID(PLASTWINDOW->m_iWorkspaceID); const auto FSMODE = PWORKSPACE->m_efFullscreenMode; - g_pCompositor->setWindowFullscreen(PLASTWINDOW, false, FULLSCREEN_FULL); + + if (!PWINDOWTOCHANGETO->m_bPinned) + g_pCompositor->setWindowFullscreen(PLASTWINDOW, false, FULLSCREEN_FULL); g_pCompositor->focusWindow(PWINDOWTOCHANGETO); - g_pCompositor->setWindowFullscreen(PWINDOWTOCHANGETO, true, FSMODE); + if (!PWINDOWTOCHANGETO->m_bPinned) + g_pCompositor->setWindowFullscreen(PWINDOWTOCHANGETO, true, FSMODE); } else { g_pCompositor->focusWindow(PWINDOWTOCHANGETO); Vector2D middle = PWINDOWTOCHANGETO->m_vRealPosition.goalv() + PWINDOWTOCHANGETO->m_vRealSize.goalv() / 2.f; @@ -1386,11 +1389,14 @@ void CKeybindManager::circleNext(std::string arg) { if (g_pCompositor->m_pLastWindow->m_iWorkspaceID == PWINDOWTOCHANGETO->m_iWorkspaceID && g_pCompositor->m_pLastWindow->m_bIsFullscreen) { const auto PWORKSPACE = g_pCompositor->getWorkspaceByID(g_pCompositor->m_pLastWindow->m_iWorkspaceID); const auto FSMODE = PWORKSPACE->m_efFullscreenMode; - g_pCompositor->setWindowFullscreen(g_pCompositor->m_pLastWindow, false, FULLSCREEN_FULL); + + if (!PWINDOWTOCHANGETO->m_bPinned) + g_pCompositor->setWindowFullscreen(g_pCompositor->m_pLastWindow, false, FULLSCREEN_FULL); g_pCompositor->focusWindow(PWINDOWTOCHANGETO); - g_pCompositor->setWindowFullscreen(PWINDOWTOCHANGETO, true, FSMODE); + if (!PWINDOWTOCHANGETO->m_bPinned) + g_pCompositor->setWindowFullscreen(PWINDOWTOCHANGETO, true, FSMODE); } else { g_pCompositor->focusWindow(PWINDOWTOCHANGETO); Vector2D middle = PWINDOWTOCHANGETO->m_vRealPosition.goalv() + PWINDOWTOCHANGETO->m_vRealSize.goalv() / 2.f;