mirror of
https://github.com/hyprwm/Hyprland
synced 2024-11-29 22:26:00 +01:00
internal: don't change ws on active swap
This commit is contained in:
parent
093755d53f
commit
fbb938fcf2
1 changed files with 25 additions and 23 deletions
|
@ -1869,6 +1869,9 @@ void CCompositor::moveWorkspaceToMonitor(CWorkspace* pWorkspace, CMonitor* pMoni
|
||||||
|
|
||||||
// fix old mon
|
// fix old mon
|
||||||
int nextWorkspaceOnMonitorID = -1;
|
int nextWorkspaceOnMonitorID = -1;
|
||||||
|
if (!SWITCHINGISACTIVE)
|
||||||
|
nextWorkspaceOnMonitorID = pWorkspace->m_iID;
|
||||||
|
else {
|
||||||
for (auto& w : m_vWorkspaces) {
|
for (auto& w : m_vWorkspaces) {
|
||||||
if (w->m_iMonitorID == POLDMON->ID && w->m_iID != pWorkspace->m_iID && !w->m_bIsSpecialWorkspace) {
|
if (w->m_iMonitorID == POLDMON->ID && w->m_iID != pWorkspace->m_iID && !w->m_bIsSpecialWorkspace) {
|
||||||
nextWorkspaceOnMonitorID = w->m_iID;
|
nextWorkspaceOnMonitorID = w->m_iID;
|
||||||
|
@ -1891,11 +1894,10 @@ void CCompositor::moveWorkspaceToMonitor(CWorkspace* pWorkspace, CMonitor* pMoni
|
||||||
}
|
}
|
||||||
|
|
||||||
Debug::log(LOG, "moveWorkspaceToMonitor: Plugging gap with existing %d", nextWorkspaceOnMonitorID);
|
Debug::log(LOG, "moveWorkspaceToMonitor: Plugging gap with existing %d", nextWorkspaceOnMonitorID);
|
||||||
|
|
||||||
POLDMON->changeWorkspace(nextWorkspaceOnMonitorID);
|
POLDMON->changeWorkspace(nextWorkspaceOnMonitorID);
|
||||||
|
}
|
||||||
|
|
||||||
// move the workspace
|
// move the workspace
|
||||||
|
|
||||||
pWorkspace->m_iMonitorID = pMonitor->ID;
|
pWorkspace->m_iMonitorID = pMonitor->ID;
|
||||||
pWorkspace->moveToMonitor(pMonitor->ID);
|
pWorkspace->moveToMonitor(pMonitor->ID);
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue