diff --git a/abstract_backend.h b/abstract_backend.h index fdbcb81887..8ab841e774 100644 --- a/abstract_backend.h +++ b/abstract_backend.h @@ -58,6 +58,10 @@ public: } void markCursorAsRendered(); + bool handlesOutputs() const { + return m_handlesOutputs; + } + Q_SIGNALS: void cursorChanged(); @@ -66,6 +70,9 @@ protected: void setSoftWareCursor(bool set); void updateCursorFromServer(); void updateCursorImage(Qt::CursorShape shape); + void handleOutputs() { + m_handlesOutputs = true; + } private Q_SLOTS: void installThemeCursor(quint32 id, const QPoint &hotspot); @@ -79,6 +86,7 @@ private: QPoint lastRenderedPosition; } m_cursor; Wayland::WaylandCursorTheme *m_cursorTheme = nullptr; + bool m_handlesOutputs = false; }; } diff --git a/wayland_server.cpp b/wayland_server.cpp index 88c9b4e5c0..d8a9ab4344 100644 --- a/wayland_server.cpp +++ b/wayland_server.cpp @@ -18,6 +18,7 @@ You should have received a copy of the GNU General Public License along with this program. If not, see . *********************************************************************/ #include "wayland_server.h" +#include "abstract_backend.h" #include "screens.h" #include "toplevel.h" #include "workspace.h" @@ -84,6 +85,9 @@ void WaylandServer::init(const QByteArray &socketName) void WaylandServer::initOutputs() { + if (m_backend && m_backend->handlesOutputs()) { + return; + } Screens *s = screens(); Q_ASSERT(s); for (int i = 0; i < s->count(); ++i) {