diff --git a/effects/diminactive/diminactive.cpp b/effects/diminactive/diminactive.cpp index aae2c8b1b2..69ba653117 100644 --- a/effects/diminactive/diminactive.cpp +++ b/effects/diminactive/diminactive.cpp @@ -372,6 +372,12 @@ void DimInactiveEffect::windowClosed(EffectWindow *w) void DimInactiveEffect::windowDeleted(EffectWindow *w) { m_forceDim.remove(w); + + // FIXME: Sometimes we can miss the window close signal because KWin + // can activate a window that is not ready for painting and the window + // gets destroyed immediately. So, we have to remove active transitions + // for that window here, otherwise we'll crash in postPaintScreen. + m_transitions.remove(w); } void DimInactiveEffect::activeFullScreenEffectChanged() diff --git a/plugins/qpa/integration.cpp b/plugins/qpa/integration.cpp index 055b8fb133..d934b97601 100644 --- a/plugins/qpa/integration.cpp +++ b/plugins/qpa/integration.cpp @@ -205,11 +205,17 @@ QPlatformOpenGLContext *Integration::createPlatformOpenGLContext(QOpenGLContext void Integration::initScreens() { QVector newScreens; + newScreens.reserve(qMax(screens()->count(), 1)); for (int i = 0; i < screens()->count(); i++) { auto screen = new Screen(i); screenAdded(screen); newScreens << screen; } + if (newScreens.isEmpty()) { + auto dummyScreen = new Screen(-1); + screenAdded(dummyScreen); + newScreens << dummyScreen; + } while (!m_screens.isEmpty()) { destroyScreen(m_screens.takeLast()); } diff --git a/useractions.cpp b/useractions.cpp index f3ca0f90bf..1d10f7a228 100644 --- a/useractions.cpp +++ b/useractions.cpp @@ -178,7 +178,7 @@ void UserActionsMenu::show(const QRect &pos, const QWeakPointer } } if (!m_client.isNull()) - m_client.data()->blockActivityUpdates(true); + m_client.data()->blockActivityUpdates(false); } }