pointer: don't calculate hw hotspot for missing hw cursors

ref #5964
This commit is contained in:
Vaxry 2024-05-09 19:17:04 +01:00
parent d7aed240db
commit fe4737fb9d

View file

@ -518,6 +518,9 @@ Vector2D CPointerManager::getCursorPosForMonitor(SP<CMonitor> pMonitor) {
} }
Vector2D CPointerManager::transformedHotspot(SP<CMonitor> pMonitor) { 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, {0, 0}}
.transform(wlr_output_transform_invert(pMonitor->transform), pMonitor->output->cursor_swapchain->width, pMonitor->output->cursor_swapchain->height) .transform(wlr_output_transform_invert(pMonitor->transform), pMonitor->output->cursor_swapchain->width, pMonitor->output->cursor_swapchain->height)
.pos(); .pos();