From b35d410deb9ba9488af828ef0fc53f116fad897d Mon Sep 17 00:00:00 2001 From: Aaron Seigo Date: Tue, 19 Jul 2011 09:36:52 +0200 Subject: [PATCH] remove the event filter if we're a containment, don't return too early from the filter --- applet.cpp | 13 ++++++++----- 1 file changed, 8 insertions(+), 5 deletions(-) diff --git a/applet.cpp b/applet.cpp index 2b557bb80..b78153e95 100644 --- a/applet.cpp +++ b/applet.cpp @@ -1799,7 +1799,6 @@ bool Applet::sceneEventFilter(QGraphicsItem *watched, QEvent *event) break; } - return false; } switch (event->type()) { @@ -2409,11 +2408,15 @@ QVariant Applet::itemChange(GraphicsItemChange change, const QVariant &value) break; case ItemParentHasChanged: { - Containment *c = containment(); - if (c && c->containmentType() == Containment::DesktopContainment) { - installSceneEventFilter(this); - } else { + if (isContainment()) { removeSceneEventFilter(this); + } else { + Containment *c = containment(); + if (c && c->containmentType() == Containment::DesktopContainment) { + installSceneEventFilter(this); + } else { + removeSceneEventFilter(this); + } } } break;