diff --git a/src/layers.cpp b/src/layers.cpp index a82fed2b80..e5a23a3359 100644 --- a/src/layers.cpp +++ b/src/layers.cpp @@ -499,8 +499,9 @@ QList Workspace::constrainedStackingOrder() const int screen = (*it)->screen(); X11Client *c = qobject_cast(*it); - QMap< Group*, Layer >::iterator mLayer = minimum_layer[screen].find(c ? c->group() : nullptr); - if (mLayer != minimum_layer[screen].end()) { + QMultiMap ¤t = minimum_layer[screen]; + QMultiMap::iterator mLayer = current.find(c ? c->group() : nullptr); + if (mLayer != current.end()) { // If a window is raised above some other window in the same window group // which is in the ActiveLayer (i.e. it's fulscreened), make sure it stays // above that window (see #95731). @@ -508,7 +509,7 @@ QList Workspace::constrainedStackingOrder() l = ActiveLayer; *mLayer = l; } else if (c) { - minimum_layer[screen].insert(c->group(), l); + current.insert(c->group(), l); } layer[ l ].append(*it); }