diff --git a/containment.cpp b/containment.cpp index 88fba4233..e08547a7b 100644 --- a/containment.cpp +++ b/containment.cpp @@ -1080,7 +1080,12 @@ 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)) { + if (d->handles.contains(applet)) { + AppletHandle *handle = d->handles.value(applet); + if (handle) { + handle->setHoverPos(he->pos()); + } + } else { //kDebug() << "generated applet handle"; AppletHandle *handle = new AppletHandle(this, applet, he->pos()); d->handles[applet] = handle; diff --git a/private/applethandle.cpp b/private/applethandle.cpp index d5483485a..690ea0d6f 100644 --- a/private/applethandle.cpp +++ b/private/applethandle.cpp @@ -926,6 +926,11 @@ void AppletHandle::appletResized() update(); } +void AppletHandle::setHoverPos(const QPointF &hoverPos) +{ + m_entryPos = hoverPos; +} + void AppletHandle::startFading(FadeType anim, const QPointF &hoverPos) { if (m_animId != 0) { diff --git a/private/applethandle_p.h b/private/applethandle_p.h index fb2151e2b..5e60e94cb 100644 --- a/private/applethandle_p.h +++ b/private/applethandle_p.h @@ -64,6 +64,7 @@ class AppletHandle : public QObject, public QGraphicsItem QPainterPath shape() const; void paint(QPainter *painter, const QStyleOptionGraphicsItem *option, QWidget *widget = 0); void startFading(FadeType anim, const QPointF &hoverPos); + void setHoverPos(const QPointF &hoverPos); protected: void mousePressEvent(QGraphicsSceneMouseEvent *event);