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:
parent
15cc6a0731
commit
926dae37a7
@ -596,6 +596,7 @@ void ExtenderItem::mouseMoveEvent(QGraphicsSceneMouseEvent *event)
|
|||||||
//position in scene coordinates (event->scenePos won't work, since it doesn't take in
|
//position in scene coordinates (event->scenePos won't work, since it doesn't take in
|
||||||
//consideration that you're leaving the current view).
|
//consideration that you're leaving the current view).
|
||||||
QPointF mousePos = d->scenePosFromScreenPos(event->screenPos());
|
QPointF mousePos = d->scenePosFromScreenPos(event->screenPos());
|
||||||
|
QPointF topleft = d->scenePosFromScreenPos(event->screenPos() - d->mousePos);
|
||||||
|
|
||||||
//find the extender we're hovering over.
|
//find the extender we're hovering over.
|
||||||
Extender *targetExtender = 0;
|
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);
|
containment->showDropZone(event->screenPos() - d->mousePos);
|
||||||
} else {
|
} else {
|
||||||
containment->showDropZone(QPoint());
|
containment->showDropZone(QPoint());
|
||||||
|
@ -371,7 +371,7 @@ void PopupApplet::showPopup(uint popupDuration)
|
|||||||
|
|
||||||
void PopupApplet::hidePopup()
|
void PopupApplet::hidePopup()
|
||||||
{
|
{
|
||||||
if (d->dialog && (formFactor() == Horizontal || formFactor() == Vertical)) {
|
if (d->dialog) {
|
||||||
d->dialog->hide();
|
d->dialog->hide();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user