[wayland] Place lockscreen greeter above other windows
Summary: BUG: 420802 Reviewers: #kwin, davidedmundson Reviewed By: #kwin, davidedmundson Subscribers: apol, kwin Tags: #kwin Differential Revision: https://phabricator.kde.org/D29523
This commit is contained in:
parent
5ea54eda5d
commit
6f8b8efb33
2 changed files with 21 additions and 0 deletions
|
@ -275,6 +275,8 @@ Layer AbstractClient::belongsToLayer() const
|
|||
// Since the desktop is also activated, nothing should be in the ActiveLayer, though
|
||||
if (isInternal())
|
||||
return UnmanagedLayer;
|
||||
if (isLockScreen())
|
||||
return UnmanagedLayer;
|
||||
if (isDesktop())
|
||||
return workspace()->showingDesktop() ? AboveLayer : DesktopLayer;
|
||||
if (isSplash()) // no damn annoying splashscreens
|
||||
|
|
|
@ -62,6 +62,7 @@ private Q_SLOTS:
|
|||
void initTestCase();
|
||||
void init();
|
||||
void cleanup();
|
||||
void testStackingOrder();
|
||||
void testPointer();
|
||||
void testPointerButton();
|
||||
void testPointerAxis();
|
||||
|
@ -223,6 +224,24 @@ void LockScreenTest::cleanup()
|
|||
Test::destroyWaylandConnection();
|
||||
}
|
||||
|
||||
void LockScreenTest::testStackingOrder()
|
||||
{
|
||||
// This test verifies that the lockscreen greeter is placed above other windows.
|
||||
|
||||
QSignalSpy clientAddedSpy(waylandServer(), &WaylandServer::shellClientAdded);
|
||||
QVERIFY(clientAddedSpy.isValid());
|
||||
|
||||
LOCK
|
||||
QVERIFY(clientAddedSpy.wait());
|
||||
|
||||
AbstractClient *client = clientAddedSpy.first().first().value<AbstractClient *>();
|
||||
QVERIFY(client);
|
||||
QVERIFY(client->isLockScreen());
|
||||
QCOMPARE(client->layer(), UnmanagedLayer);
|
||||
|
||||
UNLOCK
|
||||
}
|
||||
|
||||
void LockScreenTest::testPointer()
|
||||
{
|
||||
using namespace KWayland::Client;
|
||||
|
|
Loading…
Reference in a new issue