From 3934d1d0f2f3125fd7406e7be4f68c0f0d1e5520 Mon Sep 17 00:00:00 2001 From: Vlad Zahorodnii Date: Tue, 9 Aug 2022 14:08:26 +0300 Subject: [PATCH] wayland: Remove surface() check in Window::setupWindowManagement() At the moment, an Xwayland window can be marked ready for painting even though the corresponding wl_surface is missing. If that happens, Window::setupWindowManagement() will fail to create a plasma window and the task manager won't display the corresponding item. As a short-term solution, remove the surface() check. It's not really needed after all. For example, if it takes too long to start an app or it doesn't show up at all, we still want to see a task manager item. In long-term, kwin probably needs to take into account both xsync and whether wl_surface has been associated, which is more complex. BUG: 444325 --- src/window.cpp | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) diff --git a/src/window.cpp b/src/window.cpp index 7f7545ef82..c0b6844f30 100644 --- a/src/window.cpp +++ b/src/window.cpp @@ -2158,10 +2158,7 @@ void Window::setupWindowManagementInterface() // already setup return; } - if (!waylandServer() || !surface()) { - return; - } - if (!waylandServer()->windowManagement()) { + if (!waylandServer() || !waylandServer()->windowManagement()) { return; } using namespace KWaylandServer;