mirror of
https://github.com/hyprwm/Hyprland.git
synced 2025-07-25 17:21:54 -07:00
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:
@@ -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())
|
||||
|
Reference in New Issue
Block a user