Guard updateLayer for deleted windows
When a window is deleted it all "set" operations should no-op. As for the bug specifically, we have an effect that keeps the desktop alive. If a user calls showDesktop not only do we not update the stacking order, we also call updateLayer when the client closes this is after the window is in the deleted state. BUG: 470067
This commit is contained in:
parent
1a883f7626
commit
cf2410f631
2 changed files with 4 additions and 7 deletions
|
@ -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
|
||||
|
|
|
@ -1507,7 +1507,6 @@ protected:
|
|||
|
||||
virtual Layer belongsToLayer() const;
|
||||
virtual bool belongsToDesktop() const;
|
||||
void invalidateLayer();
|
||||
bool isActiveFullScreen() const;
|
||||
virtual Layer layerForDock() const;
|
||||
|
||||
|
|
Loading…
Reference in a new issue