if we don't have a PlasmaView, then ask QDesktopWidget which screen it thinks we are tipping on
BUG:241278 svn path=/trunk/KDE/kdelibs/; revision=1137109
This commit is contained in:
parent
6300946727
commit
e07a9c88bb
11
corona.cpp
11
corona.cpp
@ -23,6 +23,7 @@
|
|||||||
#include "corona.h"
|
#include "corona.h"
|
||||||
|
|
||||||
#include <QApplication>
|
#include <QApplication>
|
||||||
|
#include <QDesktopWidget>
|
||||||
#include <QGraphicsView>
|
#include <QGraphicsView>
|
||||||
#include <QGraphicsSceneDragDropEvent>
|
#include <QGraphicsSceneDragDropEvent>
|
||||||
#include <QGraphicsGridLayout>
|
#include <QGraphicsGridLayout>
|
||||||
@ -765,8 +766,14 @@ QPoint Corona::popupPosition(const QGraphicsItem *item, const QSize &s, Qt::Alig
|
|||||||
|
|
||||||
//are we out of screen?
|
//are we out of screen?
|
||||||
int screen = ((pv && pv->containment()) ? pv->containment()->screen() : -1);
|
int screen = ((pv && pv->containment()) ? pv->containment()->screen() : -1);
|
||||||
if (pv && screen == -1) {
|
if (screen == -1) {
|
||||||
screen = pv->screen();
|
if (pv) {
|
||||||
|
screen = pv->screen();
|
||||||
|
} else {
|
||||||
|
// fall back to asking the actual system what screen the view is on
|
||||||
|
// in the case we are dealing with a non-PlasmaView QGraphicsView
|
||||||
|
screen = QApplication::desktop()->screenNumber(v);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
QRect screenRect = screenGeometry(screen);
|
QRect screenRect = screenGeometry(screen);
|
||||||
|
Loading…
Reference in New Issue
Block a user