mirror of
https://github.com/hyprwm/Hyprland
synced 2024-11-26 07:05:58 +01:00
make monitor IDs permanent
This commit is contained in:
parent
b9be405d32
commit
c3edb20e04
3 changed files with 3 additions and 2 deletions
|
@ -1281,7 +1281,7 @@ void CCompositor::moveWindowToWorkspace(CWindow* pWindow, const std::string& wor
|
|||
|
||||
int CCompositor::getNextAvailableMonitorID() {
|
||||
int64_t topID = -1;
|
||||
for (auto& m : m_vMonitors) {
|
||||
for (auto& m : m_vRealMonitors) {
|
||||
if ((int64_t)m->ID > topID)
|
||||
topID = m->ID;
|
||||
}
|
||||
|
|
|
@ -62,6 +62,8 @@ void Events::listener_newOutput(wl_listener* listener, void* data) {
|
|||
const auto PNEWMONITORWRAP = &g_pCompositor->m_vRealMonitors.emplace_back(std::make_shared<CMonitor>());
|
||||
const auto PNEWMONITOR = PNEWMONITORWRAP->get();
|
||||
|
||||
PNEWMONITOR->ID = g_pCompositor->getNextAvailableMonitorID();
|
||||
|
||||
wlr_output_init_render(OUTPUT, g_pCompositor->m_sWLRAllocator, g_pCompositor->m_sWLRRenderer);
|
||||
|
||||
PNEWMONITOR->output = OUTPUT;
|
||||
|
|
|
@ -27,7 +27,6 @@ void CMonitor::onConnect(bool noRule) {
|
|||
|
||||
m_bEnabled = true;
|
||||
|
||||
ID = g_pCompositor->getNextAvailableMonitorID();
|
||||
szName = output->name;
|
||||
|
||||
wlr_output_set_scale(output, monitorRule.scale);
|
||||
|
|
Loading…
Reference in a new issue