Revert "wayland: Update shadow immediately"

This reverts commit 4b1ef33c1e.

It introduced a crash. The large icons task switcher can create and
destroy the shadow in the middle of painting. When a shadow is
destroyed, kwin can make opengl context current. It will reset current
QOpenGLContext, and QtQuick can crash.

BUG: 466279
This commit is contained in:
Vlad Zahorodnii 2023-02-23 09:37:00 +02:00
parent a2062090eb
commit 08e392f368

View file

@ -117,7 +117,10 @@ bool InternalWindow::eventFilter(QObject *watched, QEvent *event)
setSkipCloseAnimation(m_handle->property(s_skipClosePropertyName).toBool());
}
if (pe->propertyName() == s_shadowEnabledPropertyName) {
updateShadow();
// Some dialog e.g. Plasma::Dialog may update shadow in the middle of rendering.
// The opengl context changed by updateShadow may break the QML Window rendering
// and cause crash.
QMetaObject::invokeMethod(this, &InternalWindow::updateShadow, Qt::QueuedConnection);
}
if (pe->propertyName() == "kwin_windowType") {
m_windowType = m_handle->property("kwin_windowType").value<NET::WindowType>();