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();