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
This commit is contained in:
Virt
2025-05-23 23:41:35 +02:00
committed by GitHub
parent bd4733a0ff
commit 81cd526f92

View File

@@ -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())