diff options
Diffstat (limited to 'src/compositor/extensions/qwaylandquickshellsurfaceitem.cpp')
-rw-r--r-- | src/compositor/extensions/qwaylandquickshellsurfaceitem.cpp | 11 |
1 files changed, 7 insertions, 4 deletions
diff --git a/src/compositor/extensions/qwaylandquickshellsurfaceitem.cpp b/src/compositor/extensions/qwaylandquickshellsurfaceitem.cpp index 28806f622..dfbe41490 100644 --- a/src/compositor/extensions/qwaylandquickshellsurfaceitem.cpp +++ b/src/compositor/extensions/qwaylandquickshellsurfaceitem.cpp @@ -319,11 +319,14 @@ void QWaylandQuickShellSurfaceItemPrivate::raise() return (!staysOnTop && surf->staysOnTop()) || (staysOnBottom && !surf->staysOnBottom()); return true; // ignore any other Quick items that may be there }; - while (skip(*it)) + auto end = parent->childItems().crend(); + while (it != end && skip(*it)) ++it; - QQuickItem *top = *it; - if (moveItem != top) - moveItem->stackAfter(top); + if (it != end) { + QQuickItem *top = *it; + if (moveItem != top) + moveItem->stackAfter(top); + } } /* |