From 745b9ea07554cda9d71d10e6b937d15a90da4dde Mon Sep 17 00:00:00 2001 From: Michail Vourlakos Date: Mon, 9 Apr 2018 11:15:21 +0300 Subject: [PATCH] dont apply too early blur effect dont delay the corona destruction under wayland because that creates a crash with kwin effects BUG: 392890 --- app/dock/dockview.cpp | 6 +++--- app/dockcorona.cpp | 15 ++++++++++----- 2 files changed, 13 insertions(+), 8 deletions(-) diff --git a/app/dock/dockview.cpp b/app/dock/dockview.cpp index 0cbcf0d40..8fc5d5597 100644 --- a/app/dock/dockview.cpp +++ b/app/dock/dockview.cpp @@ -1549,9 +1549,9 @@ void DockView::setBlockHiding(bool block) void DockView::updateEffects() { - //! CRASH: Dont update effects under wayland - //! because they arent supported yet - if (KWindowSystem::isPlatformWayland()) { + //! Dont apply any effect before the wayland surface is created under wayland + //! https://bugs.kde.org/show_bug.cgi?id=392890 + if (KWindowSystem::isPlatformWayland() && !m_shellSurface) { return; } diff --git a/app/dockcorona.cpp b/app/dockcorona.cpp index bc7f40842..b1729fb71 100644 --- a/app/dockcorona.cpp +++ b/app/dockcorona.cpp @@ -133,12 +133,17 @@ DockCorona::~DockCorona() //! BEGIN: Give the time to slide-out docks when closing m_layoutManager->hideAllDocks(); - QTimer::singleShot(400, [this]() { - m_quitTimedEnded = true; - }); + //! Dont delay the destruction under wayland in any case + //! because it creates a crash with kwin effects + //! https://bugs.kde.org/show_bug.cgi?id=392890 + if (!KWindowSystem::isPlatformWayland()) { + QTimer::singleShot(400, [this]() { + m_quitTimedEnded = true; + }); - while (!m_quitTimedEnded) { - QGuiApplication::processEvents(QEventLoop::AllEvents, 50); + while (!m_quitTimedEnded) { + QGuiApplication::processEvents(QEventLoop::AllEvents, 50); + } } //! END: slide-out docks when closing