diff --git a/workspace.cpp b/workspace.cpp --- a/workspace.cpp +++ b/workspace.cpp @@ -425,6 +425,9 @@ connect(w, &WaylandServer::shellClientRemoved, this, [this] (ShellClient *c) { m_allClients.removeAll(c); + if (c == most_recently_raised) { + most_recently_raised = nullptr; + } if (c == delayfocus_client) { cancelDelayFocus(); }