diff options
| author | Virt <41426325+VirtCode@users.noreply.github.com> | 2025-05-23 23:41:35 +0200 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2025-05-23 23:41:35 +0200 |
| commit | 81cd526f923f4a9074bbfef59b4c7e9f3350c349 (patch) | |
| tree | ad0433998ff6e75e53a897d5355a7ce1fc2883e3 /src/managers/PointerManager.cpp | |
| parent | bd4733a0ff2b89fd3f22dc6ec9ff00e070753662 (diff) | |
cursor: fix screencopy cursor pos and duplicate shape with sw cursors (#10519)
* cursor: account for hotspot with overridePos
* cursor: don't draw cursor on screencopy if using sw anyways
Diffstat (limited to 'src/managers/PointerManager.cpp')
| -rw-r--r-- | src/managers/PointerManager.cpp | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/src/managers/PointerManager.cpp b/src/managers/PointerManager.cpp index 7bd66c5d..f42fd686 100644 --- a/src/managers/PointerManager.cpp +++ b/src/managers/PointerManager.cpp @@ -603,10 +603,17 @@ void CPointerManager::renderSoftwareCursorsFor(PHLMONITOR pMonitor, const Time:: return; } + // don't render cursor if forced but we are already using sw cursors for the monitor + // otherwise we draw the cursor again for screencopy when using sw cursors + if (forceRender && (state->hardwareFailed || state->softwareLocks != 0)) + return; + auto box = state->box.copy(); if (overridePos.has_value()) { box.x = overridePos->x; box.y = overridePos->y; + + box.translate(-m_currentCursorImage.hotspot); } if (box.intersection(CBox{{}, {pMonitor->m_size}}).empty()) |
