void DisplayGroupRenderer::_updateWindowItems(const DisplayGroup& displayGroup) { QSet<QUuid> updatedWindows; const QQuickItem* parentItem = nullptr; const auto helper = VisibilityHelper{displayGroup, _context.screenRect, _context.isAlphaBlendingEnabled()}; for (const auto& window : displayGroup.getWindows()) { const auto& id = window->getID(); updatedWindows.insert(id); if (!_windowItems.contains(id)) _createWindowQmlItem(window); _windowItems[id]->update(window, helper.getVisibleArea(*window)); // Update stacking order auto quickItem = _windowItems[id]->getQuickItem(); if (parentItem) quickItem->stackAfter(parentItem); parentItem = quickItem; } _removeOldWindows(updatedWindows); }
void StackableItem::raise() { QQuickItem *parent = parentItem(); Q_ASSERT(parent); QQuickItem *top = parent->childItems().last(); if (this != top) stackAfter(top); }