Keep internal clients in the unmanaged layer

Summary:
All internal clients live in the x stacking order, but when such a
client is closed, it will be moved to the normal stacking order.

Given that internal clients don't specify the desired layer, they will
be moved to the normal layer, which is not really what we want because
it means that the task switcher window will be placed below docks.

Reviewers: #kwin, davidedmundson

Reviewed By: #kwin, davidedmundson

Subscribers: kwin

Tags: #kwin

Differential Revision: https://phabricator.kde.org/D21116
icc-effect-5.17.5
Vlad Zagorodniy 2019-05-10 10:47:05 +03:00
parent b00f1fccce
commit 81cdfd2ebf
4 changed files with 15 additions and 6 deletions

View File

@ -353,6 +353,8 @@ Layer AbstractClient::belongsToLayer() const
// and the docks move into the NotificationLayer (which is between Above- and
// ActiveLayer, so that active fullscreen windows will still cover everything)
// Since the desktop is also activated, nothing should be in the ActiveLayer, though
if (isInternal())
return UnmanagedLayer;
if (isDesktop())
return workspace()->showingDesktop() ? AboveLayer : DesktopLayer;
if (isSplash()) // no damn annoying splashscreens
@ -2080,4 +2082,9 @@ Group *AbstractClient::group()
return nullptr;
}
bool AbstractClient::isInternal() const
{
return false;
}
}

View File

@ -817,6 +817,14 @@ public:
**/
virtual Group *group();
/**
* Returns whether this is an internal client.
*
* Internal clients are created by KWin and used for special purpose windows,
* like the task switcher, etc.
**/
virtual bool isInternal() const;
public Q_SLOTS:
virtual void closeWindow() = 0;

View File

@ -1083,11 +1083,6 @@ pid_t ShellClient::pid() const
return surface()->client()->processId();
}
bool ShellClient::isInternal() const
{
return false;
}
bool ShellClient::isLockScreen() const
{
return surface()->client() == waylandServer()->screenLockerClientConnection();

View File

@ -122,7 +122,6 @@ public:
**/
pid_t pid() const override;
virtual bool isInternal() const;
bool isLockScreen() const override;
bool isInputMethod() const override;
virtual QWindow *internalWindow() const;