diff options
| author | vaxerski <43317083+vaxerski@users.noreply.github.com> | 2022-11-27 22:42:22 +0000 |
|---|---|---|
| committer | vaxerski <43317083+vaxerski@users.noreply.github.com> | 2022-11-27 22:42:22 +0000 |
| commit | 0a302901d26eff02a83742aa319f20f3b3a0c372 (patch) | |
| tree | 2104ba94ae9279ef0ed8a0c3edb861564099e6a1 /src/events/Windows.cpp | |
| parent | 49063f949df92ab60244ff9e08025172bc512a8d (diff) | |
Added handling more special workspaces
Diffstat (limited to 'src/events/Windows.cpp')
| -rw-r--r-- | src/events/Windows.cpp | 9 |
1 files changed, 4 insertions, 5 deletions
diff --git a/src/events/Windows.cpp b/src/events/Windows.cpp index 256b58d7..5683eb45 100644 --- a/src/events/Windows.cpp +++ b/src/events/Windows.cpp @@ -53,10 +53,10 @@ void Events::listener_mapWindow(void* owner, void* data) { static auto *const PSWALLOWREGEX = &g_pConfigManager->getConfigValuePtr("misc:swallow_regex")->strValue; auto PMONITOR = g_pCompositor->m_pLastMonitor; - const auto PWORKSPACE = PMONITOR->specialWorkspaceOpen ? g_pCompositor->getWorkspaceByID(SPECIAL_WORKSPACE_ID) : g_pCompositor->getWorkspaceByID(PMONITOR->activeWorkspace); + const auto PWORKSPACE = PMONITOR->specialWorkspaceID ? g_pCompositor->getWorkspaceByID(PMONITOR->specialWorkspaceID) : g_pCompositor->getWorkspaceByID(PMONITOR->activeWorkspace); PWINDOW->m_iMonitorID = PMONITOR->ID; PWINDOW->m_bMappedX11 = true; - PWINDOW->m_iWorkspaceID = PMONITOR->specialWorkspaceOpen ? SPECIAL_WORKSPACE_ID : PMONITOR->activeWorkspace; + PWINDOW->m_iWorkspaceID = PMONITOR->specialWorkspaceID ? PMONITOR->specialWorkspaceID : PMONITOR->activeWorkspace; PWINDOW->m_bIsMapped = true; PWINDOW->m_bReadyToDelete = false; PWINDOW->m_bFadingOut = false; @@ -211,9 +211,8 @@ void Events::listener_mapWindow(void* owner, void* data) { shouldFocus = true; } - if (requestedWorkspace == "special") { + if (requestedWorkspace.find("special" == 0)) { workspaceSpecial = true; - workspaceSilent = true; } if (!workspaceSilent) { @@ -240,7 +239,7 @@ void Events::listener_mapWindow(void* owner, void* data) { workspaceID = g_pCompositor->getNextAvailableNamedWorkspace(); } else if (workspaceSpecial) { workspaceName = ""; - workspaceID = SPECIAL_WORKSPACE_ID; + workspaceID = getWorkspaceIDFromString(requestedWorkspace, workspaceName); } else { try { workspaceID = std::stoi(requestedWorkspace); |
