mirror of
https://github.com/hyprwm/Hyprland.git
synced 2026-08-24 02:24:14 -05:00
monitor: fix DS deactivation (#13188)
This commit is contained in:
@@ -177,6 +177,7 @@ class CMonitor {
|
||||
|
||||
// for direct scanout
|
||||
PHLWINDOWREF m_lastScanout;
|
||||
bool m_directScanoutIsActive = false; // for cleanup logic. m_lastScanout.expired() can become true before the DS cleanup if client crashes/exits while DS is active.
|
||||
bool m_scanoutNeedsCursorUpdate = false;
|
||||
|
||||
// for special fade/blur
|
||||
|
||||
@@ -1315,10 +1315,12 @@ void CHyprRenderer::renderMonitor(PHLMONITOR pMonitor, bool commit) {
|
||||
bool shouldTear = pMonitor->updateTearing();
|
||||
|
||||
if (pMonitor->attemptDirectScanout()) {
|
||||
pMonitor->m_directScanoutIsActive = true;
|
||||
return;
|
||||
} else if (!pMonitor->m_lastScanout.expired()) {
|
||||
} else if (!pMonitor->m_lastScanout.expired() || pMonitor->m_directScanoutIsActive) {
|
||||
Log::logger->log(Log::DEBUG, "Left a direct scanout.");
|
||||
pMonitor->m_lastScanout.reset();
|
||||
pMonitor->m_directScanoutIsActive = false;
|
||||
|
||||
// reset DRM format, but only if needed since it might modeset
|
||||
if (pMonitor->m_output->state->state().drmFormat != pMonitor->m_prevDrmFormat)
|
||||
|
||||
Reference in New Issue
Block a user