From d2446a59fc6586cc70811fd1ae53d7c586bde693 Mon Sep 17 00:00:00 2001 From: Marco Martin Date: Thu, 19 Feb 2009 19:43:52 +0000 Subject: [PATCH] make the applet appear in the direction nearest to the mouse instead of the entry position, more hanle-follows-mind svn path=/trunk/KDE/kdelibs/; revision=928669 --- containment.cpp | 11 +++++++++++ 1 file changed, 11 insertions(+) diff --git a/containment.cpp b/containment.cpp index 40dd5c9df..94493f069 100644 --- a/containment.cpp +++ b/containment.cpp @@ -1166,6 +1166,17 @@ bool Containment::sceneEventFilter(QGraphicsItem *watched, QEvent *event) } } break; + case QEvent::GraphicsSceneHoverMove: + if (immutability() == Mutable && applet->immutability() == Mutable) { + QGraphicsSceneHoverEvent *he = static_cast(event); + if (d->handles.contains(applet)) { + AppletHandle *handle = d->handles.value(applet); + if (handle) { + handle->setHoverPos(he->pos()); + } + } + } + break; default: break; }