From 8fc634684c037dc0d88156d2dd076412989e6bc7 Mon Sep 17 00:00:00 2001 From: Vlad Zahorodnii Date: Sun, 26 Feb 2023 15:12:19 +0200 Subject: [PATCH] wayland: Setup compositing for internal window when it's mapped Aurorae decoration plugin creates an unmapped internal window, it's not rendered and so it's not added to the Workspace. Internal window setups compositing in its constructor too. It means that the WindowItem will have a link to the scene, but since the Compositor has no any idea about the internal window yet, that scene can become a dangling pointer, and kwin can crash when the window item is destroyed. BUG: 466313 --- src/internalwindow.cpp | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/src/internalwindow.cpp b/src/internalwindow.cpp index c3349bd8bd..c30828f6fb 100644 --- a/src/internalwindow.cpp +++ b/src/internalwindow.cpp @@ -50,9 +50,6 @@ InternalWindow::InternalWindow(QWindow *handle) setOnAllDesktops(true); setOpacity(m_handle->opacity()); setSkipCloseAnimation(m_handle->property(s_skipClosePropertyName).toBool()); - - // Create scene window, effect window, and update server-side shadow. - setupCompositing(); updateColorScheme(); setMoveResizeGeometry(m_handle->geometry()); @@ -523,6 +520,7 @@ void InternalWindow::setCaption(const QString &caption) void InternalWindow::markAsMapped() { if (!ready_for_painting) { + setupCompositing(); setReadyForPainting(); workspace()->addInternalWindow(this); }