renderer: only commit hw cursor stuff if needed (#9654)

This commit is contained in:
Ikalco
2025-03-17 16:06:41 -05:00
committed by GitHub
parent c4f46473df
commit 5f60fc7d00
3 changed files with 29 additions and 5 deletions

View File

@@ -323,6 +323,8 @@ void CPointerManager::onCursorMoved() {
const auto CURSORPOS = getCursorPosForMonitor(m);
m->output->moveCursor(CURSORPOS, m->shouldSkipScheduleFrameOnMouseEvent());
state->monitor->scanoutNeedsCursorUpdate = true;
}
if (recalc)
@@ -382,6 +384,8 @@ bool CPointerManager::setHWCursorBuffer(SP<SMonitorPointerState> state, SP<Aquam
if (!state->monitor->shouldSkipScheduleFrameOnMouseEvent())
g_pCompositor->scheduleFrameForMonitor(state->monitor.lock(), Aquamarine::IOutput::AQ_SCHEDULE_CURSOR_SHAPE);
state->monitor->scanoutNeedsCursorUpdate = true;
return true;
}