From f3dc057c71d0341c4dfe4df5e9599da125982298 Mon Sep 17 00:00:00 2001 From: Vlad Zahorodnii Date: Mon, 13 Mar 2023 21:48:49 +0200 Subject: [PATCH] x11: Disable NETWinInfo in X11Window This piece of logic belongs in X11Window rather than Deleted as the latter is merely a representation of a closed window. --- src/deleted.cpp | 3 --- src/x11window.cpp | 6 ++++++ 2 files changed, 6 insertions(+), 3 deletions(-) diff --git a/src/deleted.cpp b/src/deleted.cpp index 61e3bc36d0..b552803e4a 100644 --- a/src/deleted.cpp +++ b/src/deleted.cpp @@ -66,9 +66,6 @@ void Deleted::copyToDeleted(Window *window) m_type = window->windowType(); m_windowRole = window->windowRole(); m_shade = window->isShade(); - if (WinInfo *cinfo = dynamic_cast(info)) { - cinfo->disable(); - } if (window->isDecorated()) { window->layoutDecorationRects(decoration_left, decoration_top, diff --git a/src/x11window.cpp b/src/x11window.cpp index 4bff364fc8..3e9487a895 100644 --- a/src/x11window.cpp +++ b/src/x11window.cpp @@ -394,6 +394,9 @@ void X11Window::releaseWindow(bool on_shutdown) info->setDesktop(0); info->setState(NET::States(), info->state()); // Reset all state flags } + if (WinInfo *cinfo = dynamic_cast(info)) { + cinfo->disable(); + } xcb_connection_t *c = kwinApp()->x11Connection(); m_client.deleteProperty(atoms->kde_net_wm_user_creation_time); m_client.deleteProperty(atoms->net_frame_extents); @@ -448,6 +451,9 @@ void X11Window::destroyWindow() destroyDecoration(); cleanGrouping(); workspace()->removeX11Window(this); + if (WinInfo *cinfo = dynamic_cast(info)) { + cinfo->disable(); + } m_client.reset(); // invalidate m_wrapper.reset(); m_frame.reset();