From e4ed4e5a131489611d2d6191a6c95b80d427ee3d Mon Sep 17 00:00:00 2001 From: Aleix Pol Date: Tue, 25 May 2021 02:29:19 +0200 Subject: [PATCH] Keep lostLeader code under removeX11Client The groups concept only applies to X11 clients --- src/workspace.cpp | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) diff --git a/src/workspace.cpp b/src/workspace.cpp index 8f18df2054..0e2a50b06b 100644 --- a/src/workspace.cpp +++ b/src/workspace.cpp @@ -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;