Skip to content

Commit

Permalink
pointer: don't calculate hw hotspot for missing hw cursors
Browse files Browse the repository at this point in the history
ref #5964
  • Loading branch information
vaxerski committed May 9, 2024
1 parent d7aed24 commit fe4737f
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions src/managers/PointerManager.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -518,6 +518,9 @@ Vector2D CPointerManager::getCursorPosForMonitor(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}}
.transform(wlr_output_transform_invert(pMonitor->transform), pMonitor->output->cursor_swapchain->width, pMonitor->output->cursor_swapchain->height)
.pos();
Expand Down

0 comments on commit fe4737f

Please sign in to comment.