From df6ebe358b30ee7b49f296e05763e5e4b0edce98 Mon Sep 17 00:00:00 2001 From: obivan Date: Fri, 31 May 2024 10:38:52 +0000 Subject: [PATCH] pointer: Include monitor scaling in HW hotspot calculation (#6283) --- src/managers/PointerManager.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/managers/PointerManager.cpp b/src/managers/PointerManager.cpp index 7df2d6f4..66d12076 100644 --- a/src/managers/PointerManager.cpp +++ b/src/managers/PointerManager.cpp @@ -564,7 +564,7 @@ Vector2D CPointerManager::transformedHotspot(SP pMonitor) { if (!pMonitor->output->cursor_swapchain) return {}; // doesn't matter, we have no hw cursor, and this is only for hw cursors - return CBox{currentCursorImage.hotspot, {0, 0}} + return CBox{currentCursorImage.hotspot * pMonitor->scale, {0, 0}} .transform(wlr_output_transform_invert(pMonitor->transform), pMonitor->output->cursor_swapchain->width, pMonitor->output->cursor_swapchain->height) .pos(); }