diff --git a/autotests/integration/kwin_wayland_test.h b/autotests/integration/kwin_wayland_test.h index 811cb4f4d0..6f92ede98a 100644 --- a/autotests/integration/kwin_wayland_test.h +++ b/autotests/integration/kwin_wayland_test.h @@ -47,6 +47,7 @@ class SubCompositor; class SubSurface; class Surface; class XdgDecorationManager; +class OutputManagement; } } @@ -91,6 +92,7 @@ enum class AdditionalWaylandInterface { AppMenu = 1 << 6, ShadowManager = 1 << 7, XdgDecoration = 1 << 8, + OutputManagement = 1 << 9, }; Q_DECLARE_FLAGS(AdditionalWaylandInterfaces, AdditionalWaylandInterface) /** @@ -122,6 +124,7 @@ KWayland::Client::PointerConstraints *waylandPointerConstraints(); KWayland::Client::IdleInhibitManager *waylandIdleInhibitManager(); KWayland::Client::AppMenuManager *waylandAppMenuManager(); KWayland::Client::XdgDecorationManager *xdgDecorationManager(); +KWayland::Client::OutputManagement *waylandOutputManagement(); bool waitForWaylandPointer(); bool waitForWaylandTouch(); diff --git a/autotests/integration/test_helpers.cpp b/autotests/integration/test_helpers.cpp index 7b82a627eb..fb0d12087c 100644 --- a/autotests/integration/test_helpers.cpp +++ b/autotests/integration/test_helpers.cpp @@ -41,6 +41,7 @@ along with this program. If not, see . #include #include #include +#include #include //screenlocker @@ -74,6 +75,7 @@ static struct { PlasmaWindowManagement *windowManagement = nullptr; PointerConstraints *pointerConstraints = nullptr; Registry *registry = nullptr; + OutputManagement* outputManagement = nullptr; QThread *thread = nullptr; QVector outputs; IdleInhibitManager *idleInhibit = nullptr; @@ -177,6 +179,13 @@ bool setupWaylandConnection(AdditionalWaylandInterfaces flags) return false; } } + if (flags.testFlag(AdditionalWaylandInterface::OutputManagement)) { + s_waylandConnection.outputManagement = registry->createOutputManagement(registry->interface(Registry::Interface::OutputManagement).name, + registry->interface(Registry::Interface::OutputManagement).version); + if (!s_waylandConnection.outputManagement->isValid()) { + return false; + } + } if (flags.testFlag(AdditionalWaylandInterface::PlasmaShell)) { s_waylandConnection.plasmaShell = registry->createPlasmaShell(registry->interface(Registry::Interface::PlasmaShell).name, registry->interface(Registry::Interface::PlasmaShell).version); @@ -334,6 +343,11 @@ XdgDecorationManager *xdgDecorationManager() return s_waylandConnection.xdgDecoration; } +OutputManagement *waylandOutputManagement() +{ + return s_waylandConnection.outputManagement; +} + bool waitForWaylandPointer() {