Fix VRR with software cursors and no_break_fs_vrr=0

This commit is contained in:
Szwagi 2025-12-17 19:58:42 +00:00
parent c73e8c1317
commit 58f1c43708
2 changed files with 4 additions and 3 deletions

View file

@ -1031,8 +1031,9 @@ bool CMonitor::shouldSkipScheduleFrameOnMouseEvent() {
static auto PMINRR = CConfigValue<Hyprlang::INT>("cursor:min_refresh_rate");
// skip scheduling extra frames for fullsreen apps with vrr
const bool shouldSkip = inFullscreenMode() && (*PNOBREAK == 1 || (*PNOBREAK == 2 && m_activeWorkspace->getFullscreenWindow()->getContentType() == CONTENT_TYPE_GAME)) &&
m_output->state->state().adaptiveSync;
const bool shouldRenderCursor = g_pHyprRenderer->shouldRenderCursor();
const bool noBreak = (*PNOBREAK == 1 || (*PNOBREAK == 2 && m_activeWorkspace->getFullscreenWindow()->getContentType() == CONTENT_TYPE_GAME));
const bool shouldSkip = inFullscreenMode() && (!shouldRenderCursor || noBreak) && m_output->state->state().adaptiveSync;
// keep requested minimum refresh rate
if (shouldSkip && *PMINRR && m_lastPresentationTimer.getMillis() > 1000.0f / *PMINRR) {

View file

@ -2043,7 +2043,7 @@ void CHyprRenderer::renderDragIcon(PHLMONITOR pMonitor, const Time::steady_tp& t
}
void CHyprRenderer::setCursorSurface(SP<Desktop::View::CWLSurface> surf, int hotspotX, int hotspotY, bool force) {
m_cursorHasSurface = surf;
m_cursorHasSurface = surf && surf->resource();
m_lastCursorData.name = "";
m_lastCursorData.surf = surf;