From 75cad57cd9369b184d4906618bdd52b70cda9666 Mon Sep 17 00:00:00 2001 From: Vlad Zahorodnii Date: Thu, 24 Sep 2020 10:40:57 +0300 Subject: [PATCH] Fix invalidation of cached x stacking order in wayland only mode Currently, if kwin/wayland runs without xwayland, the order in which windows are painted doesn't actually reflect the true stacking order. If the stacking order has been changed, we need to invalidate the cached x stacking order. But it's done only when RootInfo is present. If Xwayland doesn't run, RootInfo is not available and thus window raising is completely broken. With this change, the x stacking order will be invalidated every time some window has been raised, no matter what mode kwin operates in. --- layers.cpp | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) diff --git a/layers.cpp b/layers.cpp index b8c3aca12..4e3af854c 100644 --- a/layers.cpp +++ b/layers.cpp @@ -113,6 +113,7 @@ void Workspace::updateStackingOrder(bool propagate_new_clients) stacking_order = new_stacking_order; if (changed || propagate_new_clients) { propagateClients(propagate_new_clients); + markXStackingOrderAsDirty(); emit stackingOrderChanged(); if (m_compositor) { m_compositor->addRepaintFull(); @@ -217,10 +218,6 @@ void Workspace::propagateClients(bool propagate_new_clients) } rootInfo()->setClientListStacking(cl, pos); delete [] cl; - - // Make the cached stacking order invalid here, in case we need the new stacking order before we get - // the matching event, due to X being asynchronous. - markXStackingOrderAsDirty(); } /**