check m_pLastMonitor->specialWorkspaceID before checking activeWorkspace

This commit is contained in:
Ross MacLeod 2024-02-19 00:17:17 -05:00
parent 107cb86304
commit 782f32e83d

View file

@ -9,7 +9,8 @@
int workspace_for_action(bool allow_fullscreen = false) {
if (g_pLayoutManager->getCurrentLayout() != g_Hy3Layout.get()) return -1;
int workspace_id = g_pCompositor->m_pLastMonitor->activeWorkspace;
int workspace_id = g_pCompositor->m_pLastMonitor->specialWorkspaceID;
if (workspace_id == 0) workspace_id = g_pCompositor->m_pLastMonitor->activeWorkspace;
if (workspace_id == -1) return -1;
auto* workspace = g_pCompositor->getWorkspaceByID(workspace_id);