Commit f1233a64 authored by Aleix Pol Gonzalez's avatar Aleix Pol Gonzalez 🐧 Committed by Aleix Pol Gonzalez
Browse files

Clean Workspace::updateXStackingOrder()

No need to create x_stacing by iterating over stacking_order, it can be
copied. We are not performing any operations over it.
Also no need to instanciate the tree until we want to use it.
parent 0e05f4e4
......@@ -723,13 +723,11 @@ QList<Toplevel *> Workspace::xStackingOrder() const
void Workspace::updateXStackingOrder()
std::unique_ptr<Xcb::Tree> tree{std::move(m_xStackingQueryTree)};
// use our own stacking order, not the X one, as they may differ
foreach (Toplevel * c, stacking_order)
x_stacking = stacking_order;
if (tree && !tree->isNull()) {
if (m_xStackingQueryTree && !m_xStackingQueryTree->isNull()) {
std::unique_ptr<Xcb::Tree> tree{std::move(m_xStackingQueryTree)};
xcb_window_t *windows = tree->children();
const auto count = tree->data()->children_len;
int foundUnmanagedCount = unmanaged.count();
Supports Markdown
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