From 06a9c686f1b3a99720b23a6797ffe7f1ee9d074c Mon Sep 17 00:00:00 2001 From: Vlad Zahorodnii Date: Wed, 18 May 2022 12:48:15 +0300 Subject: [PATCH] Move popup cleanup from Workspace::removeX11Window() to Workspace::removeAbstractClient() This popup cleanup code can be useful also on wayland. --- src/workspace.cpp | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) diff --git a/src/workspace.cpp b/src/workspace.cpp index f59dde6051..f072fd52cb 100644 --- a/src/workspace.cpp +++ b/src/workspace.cpp @@ -724,13 +724,6 @@ void Workspace::addUnmanaged(Unmanaged *window) */ void Workspace::removeX11Window(X11Window *window) { - if (window == m_activePopupWindow) { - closeActivePopup(); - } - if (m_userActionsMenu->isMenuWindow(window)) { - m_userActionsMenu->close(); - } - Q_ASSERT(m_x11Clients.contains(window)); // TODO: if marked window is removed, notify the marked list m_x11Clients.removeAll(window); @@ -811,6 +804,13 @@ void Workspace::removeWaylandWindow(Window *window) void Workspace::removeAbstractClient(Window *window) { + if (window == m_activePopupWindow) { + closeActivePopup(); + } + if (m_userActionsMenu->isMenuWindow(window)) { + m_userActionsMenu->close(); + } + m_allClients.removeAll(window); if (window == m_delayFocusWindow) { cancelDelayFocus();