From c33c52d09a326bf01d371d1e6dda5d1282a4727c Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Thomas=20L=C3=BCbking?= Date: Fri, 13 Jan 2012 03:08:40 +0100 Subject: [PATCH] Fix regression igonring hiddenPreviews on stacking updates BUG: 289945 REVIEW: 103687 --- layers.cpp | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/layers.cpp b/layers.cpp index de882da5f3..94bfc29d36 100644 --- a/layers.cpp +++ b/layers.cpp @@ -174,6 +174,15 @@ void Workspace::propagateClients(bool propagate_new_clients) newWindowStack << (Window*)client->frameId(); } + + // when having hidden previews, stack hidden windows below everything else + // (as far as pure X stacking order is concerned), in order to avoid having + // these windows that should be unmapped to interfere with other windows + for (int i = stacking_order.size() - 1; i >= 0; i--) { + if (!stacking_order.at(i)->hiddenPreview()) + continue; + newWindowStack << (Window*)stacking_order.at(i)->frameId(); + } // TODO isn't it too inefficient to restack always all clients? // TODO don't restack not visible windows? assert(newWindowStack.at(0) == (Window*)supportWindow->winId());