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
master
Vlad Zahorodnii 2 years ago
parent 298d63bc71
commit 8fc634684c

@ -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);
}

Loading…
Cancel
Save