Tests: Add outputmanagement to test helper
This commit is contained in:
parent
ad73e13478
commit
61b55732ae
2 changed files with 17 additions and 0 deletions
|
@ -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();
|
||||
|
|
|
@ -41,6 +41,7 @@ along with this program. If not, see <http://www.gnu.org/licenses/>.
|
|||
#include <KWayland/Client/appmenu.h>
|
||||
#include <KWayland/Client/xdgshell.h>
|
||||
#include <KWayland/Client/xdgdecoration.h>
|
||||
#include <KWayland/Client/outputmanagement.h>
|
||||
#include <KWaylandServer/display.h>
|
||||
|
||||
//screenlocker
|
||||
|
@ -74,6 +75,7 @@ static struct {
|
|||
PlasmaWindowManagement *windowManagement = nullptr;
|
||||
PointerConstraints *pointerConstraints = nullptr;
|
||||
Registry *registry = nullptr;
|
||||
OutputManagement* outputManagement = nullptr;
|
||||
QThread *thread = nullptr;
|
||||
QVector<Output*> 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()
|
||||
{
|
||||
|
|
Loading…
Reference in a new issue