From 4e01d2c8b7a0edf49c1b49fbaf7cbc3663592da4 Mon Sep 17 00:00:00 2001 From: Vyacheslav Mayorov Date: Fri, 3 May 2024 17:34:21 +0300 Subject: [PATCH] workspace: fix syncing the stacking order with Xorg Deleted windows have frameId zero, which makes Xorg stack other windows below the bottom-most window instead of the correct one. To avoid that, filter out deleted windows in Workspace::propagateWindows. BUG: 478556 --- src/layers.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/layers.cpp b/src/layers.cpp index 45baa452d6..92ec81f06c 100644 --- a/src/layers.cpp +++ b/src/layers.cpp @@ -165,7 +165,7 @@ void Workspace::propagateWindows(bool propagate_new_windows) for (int i = stacking_order.size() - 1; i >= 0; --i) { X11Window *window = qobject_cast(stacking_order.at(i)); - if (!window || window->isUnmanaged() || window->hiddenPreview()) { + if (!window || window->isDeleted() || window->isUnmanaged() || window->hiddenPreview()) { continue; } @@ -182,7 +182,7 @@ void Workspace::propagateWindows(bool propagate_new_windows) // these windows that should be unmapped to interfere with other windows for (int i = stacking_order.size() - 1; i >= 0; --i) { X11Window *window = qobject_cast(stacking_order.at(i)); - if (!window || window->isUnmanaged() || !window->hiddenPreview()) { + if (!window || window->isDeleted() || window->isUnmanaged() || !window->hiddenPreview()) { continue; } newWindowStack << window->frameId();