From e385737203c0925046ec7079866c5b8b2b6cf4f4 Mon Sep 17 00:00:00 2001 From: Marco Martin Date: Fri, 25 Feb 2011 22:27:01 +0100 Subject: [PATCH] remove eventfilters if type is no more Desktop sceneeventfilters are used just for applet handles, that shouldn't exist in custom contaiments or panel containments --- containment.cpp | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/containment.cpp b/containment.cpp index 47ffb5e20..95fe4f52a 100644 --- a/containment.cpp +++ b/containment.cpp @@ -513,6 +513,12 @@ void Containment::setContainmentType(Containment::Type type) return; } + if (type != DesktopContainment) { + foreach (Plasma::Applet *applet, applets()) { + applet->removeSceneEventFilter(this); + } + } + delete d->toolBox.data(); d->type = type; d->checkContainmentFurniture();