From 12b63e2aa7ed3ecc9a20b1724b2368e9a8ab3d65 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Thomas=20L=C3=BCbking?= Date: Tue, 10 Nov 2015 22:44:22 +0100 Subject: [PATCH] remove deleted windows from motionmanagers Eg. if a window is closed while "timeline.currentValue() == 0", slotWindowClosed() will shortcut exit and not be removed from the managers, thus dangle around forever. Maybe there're other ways for a window to be deleted w/o the closed slot being entered. CCBUG: 339970 REVIEW: 126034 --- effects/desktopgrid/desktopgrid.cpp | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/effects/desktopgrid/desktopgrid.cpp b/effects/desktopgrid/desktopgrid.cpp index 1e889731ad..ae06a44a8a 100644 --- a/effects/desktopgrid/desktopgrid.cpp +++ b/effects/desktopgrid/desktopgrid.cpp @@ -422,6 +422,12 @@ void DesktopGridEffect::slotWindowDeleted(EffectWindow* w) break; } } + if (isUsingPresentWindows()) { + for (QList::iterator it = m_managers.begin(), + end = m_managers.end(); it != end; ++it) { + it->unmanage(w); + } + } } void DesktopGridEffect::slotWindowGeometryShapeChanged(EffectWindow* w, const QRect& old)