diff --git a/src/window.cpp b/src/window.cpp index 20ef92bb70..d2cf753332 100644 --- a/src/window.cpp +++ b/src/window.cpp @@ -557,21 +557,19 @@ Layer Window::layer() const void Window::updateLayer() { + if (isDeleted()) { + return; + } if (layer() == belongsToLayer()) { return; } StackingUpdatesBlocker blocker(workspace()); - invalidateLayer(); // invalidate, will be updated when doing restacking + m_layer = UnknownLayer; // invalidate, will be updated when doing restacking for (auto it = transients().constBegin(), end = transients().constEnd(); it != end; ++it) { (*it)->updateLayer(); } } -void Window::invalidateLayer() -{ - m_layer = UnknownLayer; -} - Layer Window::belongsToLayer() const { // NOTICE while showingDesktop, desktops move to the AboveLayer diff --git a/src/window.h b/src/window.h index 04f6b8b0cd..9fd10cdb63 100644 --- a/src/window.h +++ b/src/window.h @@ -1507,7 +1507,6 @@ protected: virtual Layer belongsToLayer() const; virtual bool belongsToDesktop() const; - void invalidateLayer(); bool isActiveFullScreen() const; virtual Layer layerForDock() const;