Commit 3b1c1438 authored by Vlad Zahorodnii's avatar Vlad Zahorodnii

scene: Fix window pixmap traversal order

Since the last child window pixmap is the top-most one, it needs to be
pushed on the stack first. This may fix KMail rendering issues.
parent 64ad9a61
......@@ -1332,8 +1332,9 @@ void OpenGLWindow::initializeRenderContext(RenderContext &context, const WindowP
contentRenderNode.leafType = ContentLeaf;
const QVector<WindowPixmap *> children = windowPixmap->children();
for (WindowPixmap *child : children)
stack.push(child);
for (auto it = children.rbegin(); it != children.rend(); ++it) {
stack.push(*it);
}
}
// Note that cross-fading is currently working properly only on X11. In order to make it
......
......@@ -1097,7 +1097,10 @@ WindowQuadList Scene::Window::makeContentsQuads() const
// Push the child window pixmaps onto the stack, remember we're visiting the pixmaps
// in the depth-first search manner.
stack += windowPixmap->children();
const QVector<WindowPixmap *> children = windowPixmap->children();
for (auto it = children.rbegin(); it != children.rend(); ++it) {
stack.push(*it);
}
}
return quads;
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment