Keep lostLeader code under removeX11Client

The groups concept only applies to X11 clients
This commit is contained in:
Aleix Pol 2021-05-25 02:29:19 +02:00
parent ae01ed219c
commit e4ed4e5a13

View file

@ -759,6 +759,9 @@ void Workspace::removeX11Client(X11Client *c)
Q_ASSERT(m_x11Clients.contains(c));
// TODO: if marked client is removed, notify the marked list
m_x11Clients.removeAll(c);
Group* group = findGroup(c->window());
if (group != nullptr)
group->lostLeader();
removeAbstractClient(c);
}
@ -855,10 +858,6 @@ void Workspace::removeAbstractClient(AbstractClient *client)
cancelDelayFocus();
}
attention_chain.removeAll(client);
Group* group = findGroup(client->window());
if (group != nullptr)
group->lostLeader();
should_get_focus.removeAll(client);
if (client == active_client) {
active_client = nullptr;