From 42018972e6096976fdf15ef4fcb313e26bf9fb46 Mon Sep 17 00:00:00 2001 From: "Aaron J. Seigo" Date: Tue, 29 Jul 2008 00:07:57 +0000 Subject: [PATCH] hand hover events more responsibly in containment and applethandle; another patch by ambro (abro: one more solid patch like this and i'll be hitting you up to get an svn account of your own ;) BUG:167551 svn path=/trunk/KDE/kdebase/workspace/libs/plasma/; revision=838889 --- applethandle.cpp | 1 - containment.cpp | 12 +----------- 2 files changed, 1 insertion(+), 12 deletions(-) diff --git a/applethandle.cpp b/applethandle.cpp index c44200606..40cee6000 100644 --- a/applethandle.cpp +++ b/applethandle.cpp @@ -742,7 +742,6 @@ bool AppletHandle::sceneEventFilter(QGraphicsItem *watched, QEvent *event) { if (watched == m_applet && event->type() == QEvent::GraphicsSceneHoverLeave) { hoverLeaveEvent(static_cast(event)); - return true; } return false; diff --git a/containment.cpp b/containment.cpp index 96fa913e4..1a59fa0ea 100644 --- a/containment.cpp +++ b/containment.cpp @@ -840,9 +840,7 @@ bool Containment::sceneEventFilter(QGraphicsItem *watched, QEvent *event) //kDebug() << "got hoverenterEvent" << immutability() << " " << applet->immutability(); if (immutability() == Mutable && applet->immutability() == Mutable) { QGraphicsSceneHoverEvent *he = static_cast(event); - if (d->handles.contains(applet)) { - d->handles[applet]->startFading(AppletHandle::FadeIn, he->pos()); - } else { + if (!d->handles.contains(applet)) { //kDebug() << "generated applet handle"; AppletHandle *handle = new AppletHandle(this, applet, he->pos()); d->handles[applet] = handle; @@ -853,14 +851,6 @@ bool Containment::sceneEventFilter(QGraphicsItem *watched, QEvent *event) } } break; - case QEvent::GraphicsSceneHoverLeave: - //kDebug() << "got hoverLeaveEvent"; - if (d->handles.contains(applet)) { - QGraphicsSceneHoverEvent *he = static_cast(event); - if (!d->handles[applet]->boundingRect().contains(d->handles[applet]->mapFromScene(he->scenePos()))) { - d->handles[applet]->startFading(AppletHandle::FadeOut, he->pos()); - } - } default: break; }