From adf5d8a114362a5d32013e95f254b85be048dbdb Mon Sep 17 00:00:00 2001 From: vaxerski <43317083+vaxerski@users.noreply.github.com> Date: Tue, 21 Mar 2023 17:46:26 +0000 Subject: [PATCH] monitors: update surface outputs on recover from unsafe --- src/events/Monitors.cpp | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/src/events/Monitors.cpp b/src/events/Monitors.cpp index f6b3ed9f..0412f43e 100644 --- a/src/events/Monitors.cpp +++ b/src/events/Monitors.cpp @@ -101,6 +101,13 @@ void Events::listener_newOutput(wl_listener* listener, void* data) { const auto POS = PNEWMONITOR->vecPosition + PNEWMONITOR->vecSize / 2.f; if (g_pCompositor->m_sSeat.mouse) wlr_cursor_warp(g_pCompositor->m_sWLRCursor, g_pCompositor->m_sSeat.mouse->mouse, POS.x, POS.y); + } else { + for (auto& w : g_pCompositor->m_vWindows) { + if (w->m_iMonitorID == PNEWMONITOR->ID) { + w->m_iLastSurfaceMonitorID = -1; + w->updateSurfaceOutputs(); + } + } } }