Reset most_recently_raised when removing ShellClient
Summary: This time without a test case that could trigger a crash as the only reading usage of the variable could luckily not crash. Reviewers: #plasma, #kwin Subscribers: plasma-devel, kwin Tags: #kwin Differential Revision: https://phabricator.kde.org/D6853
This commit is contained in:
parent
bd158a6321
commit
7eb05552ca
1 changed files with 3 additions and 0 deletions
|
@ -425,6 +425,9 @@ void Workspace::init()
|
||||||
connect(w, &WaylandServer::shellClientRemoved, this,
|
connect(w, &WaylandServer::shellClientRemoved, this,
|
||||||
[this] (ShellClient *c) {
|
[this] (ShellClient *c) {
|
||||||
m_allClients.removeAll(c);
|
m_allClients.removeAll(c);
|
||||||
|
if (c == most_recently_raised) {
|
||||||
|
most_recently_raised = nullptr;
|
||||||
|
}
|
||||||
if (c == delayfocus_client) {
|
if (c == delayfocus_client) {
|
||||||
cancelDelayFocus();
|
cancelDelayFocus();
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue