monitors: fix some bugs with re-plug
This commit is contained in:
parent
7e5ba5e824
commit
afe8d8dfec
2 changed files with 15 additions and 9 deletions
|
|
@ -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 = "";
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue