[wayland] Ensure we can tear down ShellClient after Workspace is destroyed
This can happen during tear down of the internal shell clients.icc-effect-5.14.5
parent
affcbac7e7
commit
3f4e733468
|
@ -155,9 +155,13 @@ ShellClient::~ShellClient() = default;
|
||||||
void ShellClient::destroyClient()
|
void ShellClient::destroyClient()
|
||||||
{
|
{
|
||||||
m_closing = true;
|
m_closing = true;
|
||||||
Deleted *del = Deleted::create(this);
|
Deleted *del = nullptr;
|
||||||
|
if (workspace()) {
|
||||||
|
del = Deleted::create(this);
|
||||||
|
}
|
||||||
emit windowClosed(this, del);
|
emit windowClosed(this, del);
|
||||||
|
|
||||||
|
if (workspace()) {
|
||||||
StackingUpdatesBlocker blocker(workspace());
|
StackingUpdatesBlocker blocker(workspace());
|
||||||
if (transientFor()) {
|
if (transientFor()) {
|
||||||
transientFor()->removeTransient(this);
|
transientFor()->removeTransient(this);
|
||||||
|
@ -170,9 +174,12 @@ void ShellClient::destroyClient()
|
||||||
++it;
|
++it;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
}
|
||||||
waylandServer()->removeClient(this);
|
waylandServer()->removeClient(this);
|
||||||
|
|
||||||
|
if (del) {
|
||||||
del->unrefWindow();
|
del->unrefWindow();
|
||||||
|
}
|
||||||
m_shellSurface = nullptr;
|
m_shellSurface = nullptr;
|
||||||
deleteClient(this);
|
deleteClient(this);
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue