ask for the screen of the view, even if it doesn't have a containment
svn path=/trunk/KDE/kdelibs/; revision=1042437
This commit is contained in:
parent
895d230262
commit
df6032f5ef
10
corona.cpp
10
corona.cpp
@ -662,9 +662,15 @@ QPoint Corona::popupPosition(const QGraphicsItem *item, const QSize &s, Qt::Alig
|
|||||||
}
|
}
|
||||||
|
|
||||||
//are we out of screen?
|
//are we out of screen?
|
||||||
QRect screenRect = screenGeometry(pv ? pv->screen() : -1);
|
int screen = ((pv && pv->containment()) ? pv->containment()->screen() : -1);
|
||||||
//kDebug() << "==> rect for" << (pv ? pv->containment()->screen() : -1) << "is" << screenRect;
|
if (pv && screen == -1) {
|
||||||
|
screen = pv->screen();
|
||||||
|
}
|
||||||
|
|
||||||
|
QRect screenRect = screenGeometry(screen);
|
||||||
|
//kDebug() << "==> rect for" << screen << "is" << screenRect;
|
||||||
|
|
||||||
|
|
||||||
if (loc != LeftEdge && pos.x() + s.width() > screenRect.right()) {
|
if (loc != LeftEdge && pos.x() + s.width() > screenRect.right()) {
|
||||||
pos.rx() -= ((pos.x() + s.width()) - screenRect.right());
|
pos.rx() -= ((pos.x() + s.width()) - screenRect.right());
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user