disable fullscreen and floating dispatchers on special

This commit is contained in:
vaxerski 2022-08-29 14:55:11 +02:00
parent 6c8ce734fb
commit 6865660e51

View file

@ -495,11 +495,10 @@ void CKeybindManager::toggleActiveFloating(std::string args) {
// remove drag status // remove drag status
g_pInputManager->currentlyDraggedWindow = nullptr; g_pInputManager->currentlyDraggedWindow = nullptr;
PWINDOW->m_bIsFloating = !PWINDOW->m_bIsFloating; if (PWINDOW->m_iWorkspaceID == SPECIAL_WORKSPACE_ID)
return;
if (PWINDOW->m_iWorkspaceID == SPECIAL_WORKSPACE_ID && PWINDOW == g_pCompositor->m_pLastWindow) { PWINDOW->m_bIsFloating = !PWINDOW->m_bIsFloating;
moveActiveToWorkspace(std::to_string(g_pCompositor->getMonitorFromID(PWINDOW->m_iMonitorID)->activeWorkspace));
}
g_pLayoutManager->getCurrentLayout()->changeWindowFloatingMode(PWINDOW); g_pLayoutManager->getCurrentLayout()->changeWindowFloatingMode(PWINDOW);
} }
@ -705,6 +704,9 @@ void CKeybindManager::fullscreenActive(std::string args) {
if (!g_pCompositor->windowValidMapped(PWINDOW)) if (!g_pCompositor->windowValidMapped(PWINDOW))
return; return;
if (PWINDOW->m_iWorkspaceID == SPECIAL_WORKSPACE_ID)
return;
g_pCompositor->setWindowFullscreen(PWINDOW, !PWINDOW->m_bIsFullscreen, args == "1" ? FULLSCREEN_MAXIMIZED : FULLSCREEN_FULL); g_pCompositor->setWindowFullscreen(PWINDOW, !PWINDOW->m_bIsFullscreen, args == "1" ? FULLSCREEN_MAXIMIZED : FULLSCREEN_FULL);
} }