From d0a6aa0836c695fac236e683af786522814449f5 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Martin=20Gr=C3=A4=C3=9Flin?= Date: Thu, 2 Jun 2016 09:28:02 +0200 Subject: [PATCH] [platforms/virtual] Support setting random screen geometries A signal is added to the VirtualBackend to change all screen geometries. This can be used from auto tests to change the screens. But it's not yet correctly reflected in other areas. E.g. not forwarded to Wayland Output, etc. --- plugins/platforms/virtual/screens_virtual.cpp | 7 +++++++ plugins/platforms/virtual/virtual_backend.h | 1 + 2 files changed, 8 insertions(+) diff --git a/plugins/platforms/virtual/screens_virtual.cpp b/plugins/platforms/virtual/screens_virtual.cpp index 3b41631fb2..f9b6d10d38 100644 --- a/plugins/platforms/virtual/screens_virtual.cpp +++ b/plugins/platforms/virtual/screens_virtual.cpp @@ -36,6 +36,13 @@ void VirtualScreens::init() KWin::Screens::init(); connect(m_backend, &VirtualBackend::sizeChanged, this, &VirtualScreens::startChangedTimer); + connect(m_backend, &VirtualBackend::outputGeometriesChanged, this, + [this] (const QVector &geometries) { + // TODO: update Wayland Output + m_geometries = geometries; + emit changed(); + } + ); updateCount(); emit changed(); } diff --git a/plugins/platforms/virtual/virtual_backend.h b/plugins/platforms/virtual/virtual_backend.h index ca3d2e1d51..5481d511fd 100644 --- a/plugins/platforms/virtual/virtual_backend.h +++ b/plugins/platforms/virtual/virtual_backend.h @@ -64,6 +64,7 @@ public: Q_SIGNALS: void sizeChanged(); + void outputGeometriesChanged(const QVector &geometries); private: QSize m_size;