Commit 2cf09cb5 authored by Martin Flöser's avatar Martin Flöser
Browse files

[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
parent 34eb146d
......@@ -185,7 +185,10 @@ void TestWaylandOutput::testRegistry()
QSignalSpy outputChanged(&output, SIGNAL(changed()));
QVERIFY(outputChanged.isValid());
output.setup(registry.bindOutput(announced.first().first().value<quint32>(), announced.first().last().value<quint32>()));
auto o = registry.bindOutput(announced.first().first().value<quint32>(), announced.first().last().value<quint32>());
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());
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment