From 926dae37a759f4da6f4eb8fc48534edda5658b53 Mon Sep 17 00:00:00 2001 From: Rob Scheepmaker Date: Tue, 25 Nov 2008 15:26:13 +0000 Subject: [PATCH] Also hide dialogs of applets on the desktop. Use topleft of extenderitem to check if we're over a containment, since that point is also used when instantiating an extenderapplet, and otherwise the dropzone could be at a different position then the actual applet being created. svn path=/trunk/KDE/kdelibs/; revision=888951 --- extenderitem.cpp | 3 ++- popupapplet.cpp | 2 +- 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/extenderitem.cpp b/extenderitem.cpp index ecaf4cb5b..736fda585 100644 --- a/extenderitem.cpp +++ b/extenderitem.cpp @@ -596,6 +596,7 @@ void ExtenderItem::mouseMoveEvent(QGraphicsSceneMouseEvent *event) //position in scene coordinates (event->scenePos won't work, since it doesn't take in //consideration that you're leaving the current view). QPointF mousePos = d->scenePosFromScreenPos(event->screenPos()); + QPointF topleft = d->scenePosFromScreenPos(event->screenPos() - d->mousePos); //find the extender we're hovering over. Extender *targetExtender = 0; @@ -617,7 +618,7 @@ void ExtenderItem::mouseMoveEvent(QGraphicsSceneMouseEvent *event) } } - if (containment->sceneBoundingRect().contains(mousePos) && !targetExtender) { + if (containment->sceneBoundingRect().contains(topleft) && !targetExtender) { containment->showDropZone(event->screenPos() - d->mousePos); } else { containment->showDropZone(QPoint()); diff --git a/popupapplet.cpp b/popupapplet.cpp index 55e908bb9..1a12edb27 100644 --- a/popupapplet.cpp +++ b/popupapplet.cpp @@ -371,7 +371,7 @@ void PopupApplet::showPopup(uint popupDuration) void PopupApplet::hidePopup() { - if (d->dialog && (formFactor() == Horizontal || formFactor() == Vertical)) { + if (d->dialog) { d->dialog->hide(); } }