pointer: Include monitor scaling in HW hotspot calculation (#6283)

This commit is contained in:
obivan 2024-05-31 10:38:52 +00:00 committed by GitHub
parent a60c7283e6
commit df6ebe358b
No known key found for this signature in database
GPG key ID: B5690EEEBB952194

View file

@ -564,7 +564,7 @@ Vector2D CPointerManager::transformedHotspot(SP<CMonitor> 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();
}