diff options
| author | MightyPlaza <123664421+MightyPlaza@users.noreply.github.com> | 2023-09-04 13:11:51 +0000 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2023-09-04 15:11:51 +0200 |
| commit | 6a0e2bbff36ad53b08289c150925f1037f856475 (patch) | |
| tree | 2e59580d52bf8ba0fa06966a574faad4b983f42a /src/managers/KeybindManager.cpp | |
| parent | 32f75ebb701f424e638a51c56860315fe000dd19 (diff) | |
socket2: added "activespecial" IPC event (#3163)
Diffstat (limited to 'src/managers/KeybindManager.cpp')
| -rw-r--r-- | src/managers/KeybindManager.cpp | 31 |
1 files changed, 2 insertions, 29 deletions
diff --git a/src/managers/KeybindManager.cpp b/src/managers/KeybindManager.cpp index 2a5a824f..333f01d1 100644 --- a/src/managers/KeybindManager.cpp +++ b/src/managers/KeybindManager.cpp @@ -1515,39 +1515,12 @@ void CKeybindManager::toggleSpecialWorkspace(std::string args) { } } - if (requestedWorkspaceIsAlreadyOpen && specialOpenOnMonitor == workspaceID) - Debug::log(LOG, "Toggling special workspace %d to closed", workspaceID); - else - Debug::log(LOG, "Toggling special workspace %d to open", workspaceID); - if (requestedWorkspaceIsAlreadyOpen && specialOpenOnMonitor == workspaceID) { // already open on this monitor + Debug::log(LOG, "Toggling special workspace %d to closed", workspaceID); PMONITOR->setSpecialWorkspace(nullptr); - } else if (requestedWorkspaceIsAlreadyOpen) { - // already open on another monitor - - if (specialOpenOnMonitor) { - g_pCompositor->getWorkspaceByID(PMONITOR->specialWorkspaceID)->startAnim(false, false); - PMONITOR->specialWorkspaceID = 0; - g_pLayoutManager->getCurrentLayout()->recalculateMonitor(PMONITOR->ID); - } - - // move to current - const auto PSPECIALWORKSPACE = g_pCompositor->getWorkspaceByID(workspaceID); - const auto POLDMON = g_pCompositor->getMonitorFromID(PSPECIALWORKSPACE->m_iMonitorID); - - POLDMON->specialWorkspaceID = 0; - g_pLayoutManager->getCurrentLayout()->recalculateMonitor(POLDMON->ID); - PMONITOR->specialWorkspaceID = workspaceID; - PSPECIALWORKSPACE->m_iMonitorID = PMONITOR->ID; - g_pLayoutManager->getCurrentLayout()->recalculateMonitor(PMONITOR->ID); - - if (const auto PWINDOW = PSPECIALWORKSPACE->getLastFocusedWindow(); PWINDOW) - g_pCompositor->focusWindow(PWINDOW); - else - g_pInputManager->refocus(); } else { - // not open anywhere + Debug::log(LOG, "Toggling special workspace %d to open", workspaceID); auto PSPECIALWORKSPACE = g_pCompositor->getWorkspaceByID(workspaceID); if (!PSPECIALWORKSPACE) |
