From 4578cf352bf2dc1e4c3406d424afa6466c5488fb Mon Sep 17 00:00:00 2001 From: Vlad Zahorodnii Date: Fri, 31 Mar 2023 09:41:01 +0300 Subject: [PATCH] Revert "Revert "wayland: Update shadow immediately"" This reverts commit 08e392f3681dd340379050efb374dcefc3c84c76. It appears like with RHI, user code can't mess with its current opengl context, so let's update shadows immediately. Just to be sure, shadow cleanup logic in ShadowItem has been hardened to avoid disturbing the current opengl context unnecessarily. BUG: 467926 --- src/internalwindow.cpp | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) diff --git a/src/internalwindow.cpp b/src/internalwindow.cpp index 96d15823aa..709353573a 100644 --- a/src/internalwindow.cpp +++ b/src/internalwindow.cpp @@ -113,10 +113,7 @@ bool InternalWindow::eventFilter(QObject *watched, QEvent *event) setSkipCloseAnimation(m_handle->property(s_skipClosePropertyName).toBool()); } if (pe->propertyName() == s_shadowEnabledPropertyName) { - // 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); + updateShadow(); } if (pe->propertyName() == "kwin_windowType") { m_windowType = m_handle->property("kwin_windowType").value();