KWayland::Client::Surface track output destruction
Summary: A compositor should send left events before deleting an output; however if it doesn't, we don't want dangly pointers in our list of outputs on the client surface. Test Plan: Unit test Reviewers: #plasma, graesslin Reviewed By: #plasma, graesslin Subscribers: plasma-devel, #frameworks Tags: #plasma_on_wayland, #frameworks Differential Revision: https://phabricator.kde.org/D7379
This commit is contained in:
parent
eac4973697
commit
ec8887ad27
1 changed files with 6 additions and 0 deletions
|
@ -1076,6 +1076,12 @@ void TestWaylandSurface::testOutput()
|
|||
QVERIFY(enteredSpy.wait());
|
||||
QCOMPARE(enteredSpy.count(), 2);
|
||||
QCOMPARE(leftSpy.count(), 1);
|
||||
|
||||
//test the client handles a misbehaving server that removes a display before updating clients
|
||||
m_display->removeOutput(serverOutput);
|
||||
QCOMPARE(leftSpy.count(), 1);
|
||||
QVERIFY(s->outputs().isEmpty());
|
||||
|
||||
}
|
||||
|
||||
QTEST_GUILESS_MAIN(TestWaylandSurface)
|
||||
|
|
Loading…
Reference in a new issue