Reuse same ID when reconnecting monitor, otherwise use minimum available ID (#2666)
Fixes #2601
This commit is contained in:
parent
b33d82734f
commit
b99ac063ea
3 changed files with 20 additions and 8 deletions
|
|
@ -76,7 +76,7 @@ void Events::listener_newOutput(wl_listener* listener, void* data) {
|
|||
Debug::log(LOG, "Adding completely new monitor.");
|
||||
PNEWMONITORWRAP = &g_pCompositor->m_vRealMonitors.emplace_back(std::make_shared<CMonitor>());
|
||||
|
||||
(*PNEWMONITORWRAP)->ID = g_pCompositor->getNextAvailableMonitorID();
|
||||
(*PNEWMONITORWRAP)->ID = g_pCompositor->getNextAvailableMonitorID(OUTPUT->name);
|
||||
}
|
||||
|
||||
const auto PNEWMONITOR = PNEWMONITORWRAP->get();
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue