[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
This commit is contained in:
parent
34eb146db7
commit
2cf09cb50d
1 changed files with 4 additions and 1 deletions
|
@ -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());
|
||||
|
||||
|
|
Loading…
Reference in a new issue