From 003993337a96494881b9d43bdf8955fd0813ada8 Mon Sep 17 00:00:00 2001 From: Nicola Guerrera Date: Sat, 10 Jun 2023 12:28:00 +0200 Subject: [PATCH] calculate zoom_center based on monitor scale (#2482) --- src/render/OpenGL.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/render/OpenGL.cpp b/src/render/OpenGL.cpp index e47f5119..fc45663e 100644 --- a/src/render/OpenGL.cpp +++ b/src/render/OpenGL.cpp @@ -159,7 +159,7 @@ void CHyprOpenGLImpl::end() { if (m_RenderData.mouseZoomFactor != 1.f) { const auto ZOOMCENTER = - m_RenderData.mouseZoomUseMouse ? g_pInputManager->getMouseCoordsInternal() - m_RenderData.pMonitor->vecPosition : m_RenderData.pMonitor->vecTransformedSize / 2.f; + (m_RenderData.mouseZoomUseMouse ? g_pInputManager->getMouseCoordsInternal() - m_RenderData.pMonitor->vecPosition : m_RenderData.pMonitor->vecTransformedSize / 2.f) * m_RenderData.pMonitor->scale; monbox.x -= ZOOMCENTER.x; monbox.y -= ZOOMCENTER.y; scaleBox(&monbox, m_RenderData.mouseZoomFactor);