Call Workspace::clientHidden when ShellClient gets destroyed

Ensures that active_client gets changed if it was a ShellClient.
This commit is contained in:
Martin Gräßlin 2015-04-30 13:48:59 +02:00
parent 597a9da77f
commit e9e055dcca
3 changed files with 4 additions and 1 deletions

View file

@ -61,6 +61,7 @@ ShellClient::~ShellClient() = default;
void ShellClient::destroyClient()
{
m_closing = true;
Deleted *del = Deleted::create(this);
emit windowClosed(this, del);
waylandServer()->removeClient(this);
@ -235,7 +236,7 @@ bool ShellClient::isResizable() const
bool ShellClient::isShown(bool shaded_is_shown) const
{
Q_UNUSED(shaded_is_shown)
return true;
return !m_closing;
}
void ShellClient::maximize(MaximizeMode)

View file

@ -98,6 +98,7 @@ private:
KWayland::Server::ShellSurfaceInterface *m_shellSurface;
QSize m_clientSize;
bool m_closing = false;
};
}

View file

@ -388,6 +388,7 @@ void Workspace::init()
);
connect(w, &WaylandServer::shellClientRemoved, this,
[this] (ShellClient *c) {
clientHidden(c);
emit clientRemoved(c);
x_stacking_dirty = true;
updateStackingOrder(true);