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:
parent
bd4733a0ff
commit
81cd526f92
1 changed files with 7 additions and 0 deletions
|
|
@ -603,10 +603,17 @@ void CPointerManager::renderSoftwareCursorsFor(PHLMONITOR pMonitor, const Time::
|
||||||
return;
|
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();
|
auto box = state->box.copy();
|
||||||
if (overridePos.has_value()) {
|
if (overridePos.has_value()) {
|
||||||
box.x = overridePos->x;
|
box.x = overridePos->x;
|
||||||
box.y = overridePos->y;
|
box.y = overridePos->y;
|
||||||
|
|
||||||
|
box.translate(-m_currentCursorImage.hotspot);
|
||||||
}
|
}
|
||||||
|
|
||||||
if (box.intersection(CBox{{}, {pMonitor->m_size}}).empty())
|
if (box.intersection(CBox{{}, {pMonitor->m_size}}).empty())
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue