diff options
| author | vaxerski <43317083+vaxerski@users.noreply.github.com> | 2023-05-06 16:49:46 +0100 |
|---|---|---|
| committer | vaxerski <43317083+vaxerski@users.noreply.github.com> | 2023-05-06 16:50:15 +0100 |
| commit | afe8d8dfece87cb3b5f8429964e77d4ebf7b2959 (patch) | |
| tree | 40937705d651ad1fa90569258c89ce0ccccb6028 /src/helpers/Monitor.cpp | |
| parent | 7e5ba5e824f959d1f278b3b35033f382a6364bce (diff) | |
monitors: fix some bugs with re-plug
Diffstat (limited to 'src/helpers/Monitor.cpp')
| -rw-r--r-- | src/helpers/Monitor.cpp | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/src/helpers/Monitor.cpp b/src/helpers/Monitor.cpp index 1102517d..166a18d4 100644 --- a/src/helpers/Monitor.cpp +++ b/src/helpers/Monitor.cpp @@ -145,7 +145,7 @@ void CMonitor::onConnect(bool noRule) { setupDefaultWS(monitorRule); for (auto& ws : g_pCompositor->m_vWorkspaces) { - if (ws->m_szLastMonitor == szName) { + if (ws->m_szLastMonitor == szName || g_pCompositor->m_vMonitors.size() == 1 /* avoid lost workspaces on recover */) { g_pCompositor->moveWorkspaceToMonitor(ws.get(), this); ws->startAnim(true, true, true); ws->m_szLastMonitor = ""; |
