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
This commit is contained in:
Rob Scheepmaker 2008-11-25 15:26:13 +00:00
parent 15cc6a0731
commit 926dae37a7
2 changed files with 3 additions and 2 deletions

View File

@ -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());

View File

@ -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();
}
}