diff options
| author | vaxerski <43317083+vaxerski@users.noreply.github.com> | 2022-10-25 10:30:25 +0100 |
|---|---|---|
| committer | vaxerski <43317083+vaxerski@users.noreply.github.com> | 2022-10-25 10:30:25 +0100 |
| commit | 34bd2cf803e790e6592707cbc5dfd0d3b42b86fe (patch) | |
| tree | 7e29f5de68d0fd1a778416acaa406dec2a4192e7 /src | |
| parent | 69f1d7b3607bb088512420052b9e0d48e529772d (diff) | |
respect wsbind in workspace silent rules
Diffstat (limited to 'src')
| -rw-r--r-- | src/Compositor.cpp | 11 |
1 files changed, 9 insertions, 2 deletions
diff --git a/src/Compositor.cpp b/src/Compositor.cpp index d811b8d5..1bab19ab 100644 --- a/src/Compositor.cpp +++ b/src/Compositor.cpp @@ -1878,14 +1878,21 @@ bool CCompositor::cursorOnReservedArea() { CWorkspace* CCompositor::createNewWorkspace(const int& id, const int& monid, const std::string& name) { const auto NAME = name == "" ? std::to_string(id) : name; - const auto PWORKSPACE = m_vWorkspaces.emplace_back(std::make_unique<CWorkspace>(monid, NAME, id == SPECIAL_WORKSPACE_ID)).get(); + auto monID = monid; + + // check if bound + if (const auto PMONITOR = g_pConfigManager->getBoundMonitorForWS(NAME); PMONITOR) { + monID = PMONITOR->ID; + } + + const auto PWORKSPACE = m_vWorkspaces.emplace_back(std::make_unique<CWorkspace>(monID, NAME, id == SPECIAL_WORKSPACE_ID)).get(); // We are required to set the name here immediately if (id != SPECIAL_WORKSPACE_ID) wlr_ext_workspace_handle_v1_set_name(PWORKSPACE->m_pWlrHandle, NAME.c_str()); PWORKSPACE->m_iID = id; - PWORKSPACE->m_iMonitorID = monid; + PWORKSPACE->m_iMonitorID = monID; return PWORKSPACE; } |
