From ab2c65e535bef2acc5c6b0a0c12af1b112652499 Mon Sep 17 00:00:00 2001 From: vaxerski <43317083+vaxerski@users.noreply.github.com> Date: Wed, 20 Apr 2022 19:36:05 +0200 Subject: [PATCH] Set last monitor when unset on monitor attach --- src/events/Monitors.cpp | 3 +++ 1 file changed, 3 insertions(+) diff --git a/src/events/Monitors.cpp b/src/events/Monitors.cpp index 4369af45..6de80d5c 100644 --- a/src/events/Monitors.cpp +++ b/src/events/Monitors.cpp @@ -118,6 +118,9 @@ void Events::listener_newOutput(wl_listener* listener, void* data) { if (!pMostHzMonitor || monitorRule.refreshRate > pMostHzMonitor->refreshRate) pMostHzMonitor = PNEWMONITOR; // + + if (!g_pCompositor->m_pLastMonitor) // set the last monitor if it isnt set yet + g_pCompositor->m_pLastMonitor = PNEWMONITOR; } void Events::listener_monitorFrame(void* owner, void* data) {