mirror of
https://github.com/hyprwm/Hyprland
synced 2025-12-29 17:10:13 +01:00
Fix VRR with software cursors and no_break_fs_vrr=0
This commit is contained in:
parent
c73e8c1317
commit
58f1c43708
2 changed files with 4 additions and 3 deletions
|
|
@ -1031,8 +1031,9 @@ bool CMonitor::shouldSkipScheduleFrameOnMouseEvent() {
|
||||||
static auto PMINRR = CConfigValue<Hyprlang::INT>("cursor:min_refresh_rate");
|
static auto PMINRR = CConfigValue<Hyprlang::INT>("cursor:min_refresh_rate");
|
||||||
|
|
||||||
// skip scheduling extra frames for fullsreen apps with vrr
|
// skip scheduling extra frames for fullsreen apps with vrr
|
||||||
const bool shouldSkip = inFullscreenMode() && (*PNOBREAK == 1 || (*PNOBREAK == 2 && m_activeWorkspace->getFullscreenWindow()->getContentType() == CONTENT_TYPE_GAME)) &&
|
const bool shouldRenderCursor = g_pHyprRenderer->shouldRenderCursor();
|
||||||
m_output->state->state().adaptiveSync;
|
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
|
// keep requested minimum refresh rate
|
||||||
if (shouldSkip && *PMINRR && m_lastPresentationTimer.getMillis() > 1000.0f / *PMINRR) {
|
if (shouldSkip && *PMINRR && m_lastPresentationTimer.getMillis() > 1000.0f / *PMINRR) {
|
||||||
|
|
|
||||||
|
|
@ -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) {
|
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.name = "";
|
||||||
m_lastCursorData.surf = surf;
|
m_lastCursorData.surf = surf;
|
||||||
|
|
|
||||||
Loading…
Add table
Reference in a new issue