From 3229862dd4cbfa93638a4d16ed86ec2fda5d38a6 Mon Sep 17 00:00:00 2001 From: vaxerski <43317083+vaxerski@users.noreply.github.com> Date: Sat, 15 Jul 2023 23:10:05 +0200 Subject: xwayland: guard monitor validity in xwayland scale overriding --- src/managers/XWaylandManager.cpp | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/src/managers/XWaylandManager.cpp b/src/managers/XWaylandManager.cpp index af4bafa8..9ef02f71 100644 --- a/src/managers/XWaylandManager.cpp +++ b/src/managers/XWaylandManager.cpp @@ -309,6 +309,10 @@ void CHyprXWaylandManager::setXWaylandScale(std::optional scale) { #ifndef NO_XWAYLAND wl_resource* res = nullptr; for (auto& m : g_pCompositor->m_vMonitors) { + + if (!m->output || !m->m_bEnabled) + continue; + const Vector2D LOGICALSIZE = m->vecTransformedSize / scale.value_or(m->scale); wl_resource* outputResource = nullptr; -- cgit v1.2.3