summaryrefslogtreecommitdiff
path: root/src/render/Renderer.cpp
diff options
context:
space:
mode:
authorVaxry <vaxry@vaxry.net>2023-11-24 21:30:28 +0000
committerVaxry <vaxry@vaxry.net>2023-11-24 21:30:28 +0000
commit1a2a2da6aa1b8ee0ff6b85112d088dcc5c93862f (patch)
tree43dd77f479e371dfe580d4395bf0c51d519cb1db /src/render/Renderer.cpp
parent822775aa8c0134e66cbf09b7dfd785fad13f329a (diff)
renderer: fixup cursor scaling
fixes #3935
Diffstat (limited to 'src/render/Renderer.cpp')
-rw-r--r--src/render/Renderer.cpp4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/render/Renderer.cpp b/src/render/Renderer.cpp
index 00fb6aa1..21517703 100644
--- a/src/render/Renderer.cpp
+++ b/src/render/Renderer.cpp
@@ -2209,7 +2209,7 @@ void CHyprRenderer::recheckSolitaryForMonitor(CMonitor* pMonitor) {
}
void CHyprRenderer::renderSoftwareCursors(CMonitor* pMonitor, const CRegion& damage, std::optional<Vector2D> overridePos) {
- const auto CURSORPOS = overridePos.value_or(g_pInputManager->getMouseCoordsInternal() - pMonitor->vecPosition);
+ const auto CURSORPOS = overridePos.value_or(g_pInputManager->getMouseCoordsInternal() - pMonitor->vecPosition) * pMonitor->scale;
wlr_output_cursor* cursor;
wl_list_for_each(cursor, &pMonitor->output->cursors, link) {
if (!cursor->enabled || !cursor->visible || pMonitor->output->hardware_cursor == cursor)
@@ -2218,7 +2218,7 @@ void CHyprRenderer::renderSoftwareCursors(CMonitor* pMonitor, const CRegion& dam
if (!cursor->texture)
continue;
- CBox cursorBox = CBox{CURSORPOS.x, CURSORPOS.y, cursor->width, cursor->height}.translate({-cursor->hotspot_x, -cursor->hotspot_y}).scale(pMonitor->scale);
+ CBox cursorBox = CBox{CURSORPOS.x, CURSORPOS.y, cursor->width, cursor->height}.translate({-cursor->hotspot_x, -cursor->hotspot_y});
// TODO: NVIDIA doesn't like if we use renderTexturePrimitive here. Why?
g_pHyprOpenGL->renderTexture(cursor->texture, &cursorBox, 1.0);