summaryrefslogtreecommitdiff
path: root/src/render/OpenGL.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/render/OpenGL.cpp')
-rw-r--r--src/render/OpenGL.cpp3
1 files changed, 2 insertions, 1 deletions
diff --git a/src/render/OpenGL.cpp b/src/render/OpenGL.cpp
index b2ec69f3..d93e7196 100644
--- a/src/render/OpenGL.cpp
+++ b/src/render/OpenGL.cpp
@@ -14,6 +14,7 @@
#include "../config/ConfigManager.hpp"
#include "../managers/PointerManager.hpp"
#include "../desktop/LayerSurface.hpp"
+#include "../desktop/state/FocusState.hpp"
#include "../protocols/LayerShell.hpp"
#include "../protocols/core/Compositor.hpp"
#include "../protocols/ColorManagement.hpp"
@@ -424,7 +425,7 @@ CHyprOpenGLImpl::CHyprOpenGLImpl() : m_drmFD(g_pCompositor->m_drmRenderNode.fd >
auto PMONITOR = g_pCompositor->getMonitorFromName(!E.device->m_boundOutput.empty() ? E.device->m_boundOutput : "");
- PMONITOR = PMONITOR ? PMONITOR : g_pCompositor->m_lastMonitor.lock();
+ PMONITOR = PMONITOR ? PMONITOR : Desktop::focusState()->monitor();
const auto TOUCH_COORDS = PMONITOR->m_position + (E.pos * PMONITOR->m_size);