monitor/dpms: fix possible invalid state

If dpms gets immediately re-enabled, a commit could fail, not schedule any frames anymore, and the monitor would be stuck off. Fix this by adding a timer to retry if commit fails.

ref #12045
This commit is contained in:
Vaxry 2025-10-27 13:34:08 +00:00
parent fd42e9d082
commit 560c53d87d
No known key found for this signature in database
GPG key ID: 665806380871D640
2 changed files with 28 additions and 2 deletions

View file

@ -68,6 +68,7 @@ struct SMonitorRule {
class CMonitor;
class CSyncTimeline;
class CEGLSync;
class CEventLoopTimer;
class CMonitorState {
public:
@ -138,6 +139,8 @@ class CMonitor {
bool m_createdByUser = false;
bool m_isUnsafeFallback = false;
SP<CEventLoopTimer> m_dpmsRetryTimer;
bool m_pendingFrame = false; // if we schedule a frame during rendering, reschedule it after
bool m_renderingActive = false;