From ce7fef539a3e8a155d1c821686479503164f5983 Mon Sep 17 00:00:00 2001 From: Johan Klokkhammer Helsing Date: Wed, 16 Jan 2019 10:39:42 +0100 Subject: Client: Implement xdg-output-unstable-v1 version 2 Adds handler for the new name event and updates tests accordingly. This means QScreen::name() will now typically return strings like: "VGA-1", "WL-1", "DP-2", "HDMI-A-1" instead of "Screen25", "Screen26", "Screen27" etc. Change-Id: I3d5748a2fd0d772e2344ac53f0ed808790a84ba5 Reviewed-by: Pier Luigi Fiorini --- tests/auto/client/xdgoutput/tst_xdgoutput.cpp | 6 ++++++ 1 file changed, 6 insertions(+) (limited to 'tests') diff --git a/tests/auto/client/xdgoutput/tst_xdgoutput.cpp b/tests/auto/client/xdgoutput/tst_xdgoutput.cpp index 6da2c35e8..a628810d1 100644 --- a/tests/auto/client/xdgoutput/tst_xdgoutput.cpp +++ b/tests/auto/client/xdgoutput/tst_xdgoutput.cpp @@ -100,6 +100,7 @@ public: add(version); }); } + XdgOutputV1 *xdgOutput(int i = 0) { return get()->getXdgOutput(output(i)); } }; class tst_xdgoutput : public QObject, private XdgOutputV1Compositor @@ -121,9 +122,14 @@ void tst_xdgoutput::primaryScreen() { // Verify that the client has bound to the global QCOMPOSITOR_TRY_COMPARE(get()->resourceMap().size(), 1); + exec([=] { + auto *resource = xdgOutput()->resourceMap().value(client()); + QCOMPARE(resource->version(), 2); + }); auto *s = QGuiApplication::primaryScreen(); QTRY_COMPARE(s->size(), QSize(1920, 1080)); QTRY_COMPARE(s->geometry().topLeft(), QPoint(0, 0)); + QTRY_COMPARE(s->name(), QString("WL-1")); } void tst_xdgoutput::overrideGeometry() -- cgit v1.2.3