aboutsummaryrefslogtreecommitdiffhomepage
diff options
context:
space:
mode:
authorVaxry <[email protected]>2024-05-09 19:17:04 +0100
committerVaxry <[email protected]>2024-05-09 19:17:04 +0100
commitfe4737fb9d578400ecfc63dc6ab4d684993362b8 (patch)
tree58cbf11d2563bf7e3c118a12ef953d93406a5c74
parentd7aed240db408259228bf09708986c82bdca23eb (diff)
downloadHyprland-fe4737fb9d578400ecfc63dc6ab4d684993362b8.tar.gz
Hyprland-fe4737fb9d578400ecfc63dc6ab4d684993362b8.zip
pointer: don't calculate hw hotspot for missing hw cursors
ref #5964
-rw-r--r--src/managers/PointerManager.cpp3
1 files changed, 3 insertions, 0 deletions
diff --git a/src/managers/PointerManager.cpp b/src/managers/PointerManager.cpp
index c6478b9a..21c6998f 100644
--- a/src/managers/PointerManager.cpp
+++ b/src/managers/PointerManager.cpp
@@ -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();