mirror of
https://github.com/virtcode/hypr-dynamic-cursors
synced 2025-09-19 16:13:21 +02:00
fix: account for hotspot on zoom transform
This commit is contained in:
parent
8950c117f7
commit
80750df211
1 changed files with 4 additions and 0 deletions
|
@ -44,6 +44,10 @@ void CDynamicCursors::renderSoftware(CPointerManager* pointers, SP<CMonitor> pMo
|
|||
box.y = overridePos->y;
|
||||
}
|
||||
|
||||
// poperly transform hotspot, this first has to undo the hotspot transform from getCursorBoxGlobal
|
||||
box.x = box.x + pointers->currentCursorImage.hotspot.x - pointers->currentCursorImage.hotspot.x * zoom;
|
||||
box.y = box.y + pointers->currentCursorImage.hotspot.y - pointers->currentCursorImage.hotspot.y * zoom;
|
||||
|
||||
if (box.intersection(CBox{{}, {pMonitor->vecSize}}).empty())
|
||||
return;
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue