diff --git a/src/events/Monitors.cpp b/src/events/Monitors.cpp index 85b76abd..90617f51 100644 --- a/src/events/Monitors.cpp +++ b/src/events/Monitors.cpp @@ -135,7 +135,7 @@ void Events::listener_newOutput(wl_listener* listener, void* data) { PNEWMONITOR->pWLRWorkspaceGroupHandle = wlr_ext_workspace_group_handle_v1_create(g_pCompositor->m_sWLREXTWorkspaceMgr); // Workspace - const auto WORKSPACEID = monitorRule.defaultWorkspaceID == -1 ? g_pCompositor->m_lWorkspaces.size() : monitorRule.defaultWorkspaceID; + const auto WORKSPACEID = monitorRule.defaultWorkspaceID == -1 ? g_pCompositor->m_lWorkspaces.size() + 1 /* Cuz workspaces doesnt have the new one yet and we start with 1 */ : monitorRule.defaultWorkspaceID; g_pCompositor->m_lWorkspaces.emplace_back(newMonitor.ID); const auto PNEWWORKSPACE = &g_pCompositor->m_lWorkspaces.back();