From 2cf09cb50d92242b401689fe35d2c456adf90406 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Martin=20Gr=C3=A4=C3=9Flin?= Date: Mon, 22 Aug 2016 10:02:28 +0200 Subject: [PATCH] [client] Track all created Outputs and add static get method Summary: This change starts to track all Outputs and introduces a static method to get an Output* for a wl_output* in case the wl_output* is known to Output. This is needed for the enter and leave events on wl_surface. Reviewers: #plasma_on_wayland Subscribers: plasma-devel Tags: #plasma_on_wayland Differential Revision: https://phabricator.kde.org/D2526 --- src/wayland/autotests/client/test_wayland_output.cpp | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/src/wayland/autotests/client/test_wayland_output.cpp b/src/wayland/autotests/client/test_wayland_output.cpp index 010e37f6a8..7b377e1b63 100644 --- a/src/wayland/autotests/client/test_wayland_output.cpp +++ b/src/wayland/autotests/client/test_wayland_output.cpp @@ -185,7 +185,10 @@ void TestWaylandOutput::testRegistry() QSignalSpy outputChanged(&output, SIGNAL(changed())); QVERIFY(outputChanged.isValid()); - output.setup(registry.bindOutput(announced.first().first().value(), announced.first().last().value())); + auto o = registry.bindOutput(announced.first().first().value(), announced.first().last().value()); + QVERIFY(!KWayland::Client::Output::get(o)); + output.setup(o); + QCOMPARE(KWayland::Client::Output::get(o), &output); wl_display_flush(m_connection->display()); QVERIFY(outputChanged.wait());