diff options
| author | Vaxry <vaxry@vaxry.net> | 2025-02-15 00:18:43 +0000 |
|---|---|---|
| committer | Vaxry <vaxry@vaxry.net> | 2025-02-15 00:18:43 +0000 |
| commit | 1309b59f2cb5179a4c59c111c35c7feede535eb6 (patch) | |
| tree | d86f631bb3cea78d709955af22e8d79bbd73fc3a /src/helpers/Monitor.cpp | |
| parent | fb36815b0146d7b494cd648be0dfaa67a14d164a (diff) | |
monitor: report a scheduled frame when tearing on cursor move
Diffstat (limited to 'src/helpers/Monitor.cpp')
| -rw-r--r-- | src/helpers/Monitor.cpp | 18 |
1 files changed, 18 insertions, 0 deletions
diff --git a/src/helpers/Monitor.cpp b/src/helpers/Monitor.cpp index fead5db9..24db3ea4 100644 --- a/src/helpers/Monitor.cpp +++ b/src/helpers/Monitor.cpp @@ -1441,6 +1441,24 @@ void CMonitor::onMonitorFrame() { g_pHyprRenderer->renderMonitor(self.lock()); } +void CMonitor::onCursorMovedOnMonitor() { + if (!tearingState.activelyTearing || !solitaryClient || !g_pHyprRenderer->shouldRenderCursor()) + return; + + // submit a frame immediately. This will only update the cursor pos. + // output->state->setBuffer(output->state->state().buffer); + // output->state->addDamage(CRegion{}); + // output->state->setPresentationMode(Aquamarine::eOutputPresentationMode::AQ_OUTPUT_PRESENTATION_IMMEDIATE); + // if (!output->commit()) + // Debug::log(ERR, "onCursorMovedOnMonitor: tearing and wanted to update cursor, failed."); + + // FIXME: try to do the above. We currently can't just render because drm is a fucking bitch + // and throws a "nO pRoP cAn Be ChAnGeD dUrInG AsYnC fLiP" on crtc_x + // this will throw too but fix it if we use sw cursors + + tearingState.frameScheduledWhileBusy = true; +} + CMonitorState::CMonitorState(CMonitor* owner) : m_pOwner(owner) { ; } |
