mirror of
https://github.com/hyprwm/Hyprland.git
synced 2025-07-31 04:01:56 -07:00
don't duplicate workspaces on connect
This commit is contained in:
@@ -110,7 +110,7 @@ void Events::listener_newOutput(wl_listener* listener, void* data) {
|
||||
wlr_ext_workspace_group_handle_v1_output_enter(PNEWMONITOR->pWLRWorkspaceGroupHandle, PNEWMONITOR->output);
|
||||
|
||||
// Workspace
|
||||
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;
|
||||
const auto WORKSPACEID = monitorRule.defaultWorkspaceID == -1 && !g_pCompositor->getWorkspaceByID(monitorRule.defaultWorkspaceID) ? 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();
|
||||
|
||||
|
Reference in New Issue
Block a user