From 4f1033f17bb062b6053a3fdfc1f04b5df0df3ddd Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Martin=20Gr=C3=A4=C3=9Flin?= Date: Mon, 31 Aug 2015 11:39:26 +0200 Subject: [PATCH] [wayland] AbstractBackend indicates whether outputs are enabled By default Outputs are considered to be enabled. This allows a concrete backend implementation to mark outputs as disabled (e.g. if dpms has put outputs into powersaving mode). This allows the Compositor to disable itself if outputs are not visible anyway. --- abstract_backend.h | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/abstract_backend.h b/abstract_backend.h index a6586d93ed..ceda6b8394 100644 --- a/abstract_backend.h +++ b/abstract_backend.h @@ -86,6 +86,9 @@ public: bool supportsPointerWarping() const { return m_pointerWarping; } + bool areOutputsEnabled() const { + return m_outputsEnabled; + } public Q_SLOTS: void pointerMotion(const QPointF &position, quint32 time); @@ -128,6 +131,9 @@ protected: void setSupportsPointerWarping(bool set) { m_pointerWarping = set; } + void setOutputsEnabled(bool enabled) { + m_outputsEnabled = enabled; + } private: void triggerCursorRepaint(); @@ -144,6 +150,7 @@ private: QSize m_initialWindowSize; QByteArray m_deviceIdentifier; bool m_pointerWarping = false; + bool m_outputsEnabled = true; }; }