diff options
author | Jørgen Lind <jorgen.lind@nokia.com> | 2011-04-20 07:17:13 (GMT) |
---|---|---|
committer | Jørgen Lind <jorgen.lind@nokia.com> | 2011-04-20 08:42:07 (GMT) |
commit | 69c759f5b84c2f6a44377e5f72cfe9d5bf7344c6 (patch) | |
tree | c35fc6d4e4d09ed4be138309a22a711e0e5c2a77 /src | |
parent | c0021af006e9cc10ddc6123bf712af6ce77757c0 (diff) | |
download | Qt-69c759f5b84c2f6a44377e5f72cfe9d5bf7344c6.zip Qt-69c759f5b84c2f6a44377e5f72cfe9d5bf7344c6.tar.gz Qt-69c759f5b84c2f6a44377e5f72cfe9d5bf7344c6.tar.bz2 |
Lighthouse: Fix virtual desktopwidget
Diffstat (limited to 'src')
-rw-r--r-- | src/gui/kernel/qdesktopwidget_qpa.cpp | 12 | ||||
-rw-r--r-- | src/gui/kernel/qdesktopwidget_qpa_p.h | 1 |
2 files changed, 4 insertions, 9 deletions
diff --git a/src/gui/kernel/qdesktopwidget_qpa.cpp b/src/gui/kernel/qdesktopwidget_qpa.cpp index cff05f5..6257a8b 100644 --- a/src/gui/kernel/qdesktopwidget_qpa.cpp +++ b/src/gui/kernel/qdesktopwidget_qpa.cpp @@ -51,6 +51,8 @@ QT_USE_NAMESPACE void QDesktopWidgetPrivate::updateScreenList() { + Q_Q(QDesktopWidget); + QList<QPlatformScreen *> screenList = QApplicationPrivate::platformIntegration()->screens(); int targetLength = screenList.length(); int currentLength = screens.length(); @@ -72,19 +74,15 @@ void QDesktopWidgetPrivate::updateScreenList() } QRegion virtualGeometry; - bool doVirtualGeometry = QApplicationPrivate::platformIntegration()->isVirtualDesktop(); // update the geometry of each screen widget for (int i = 0; i < screens.length(); i++) { QRect screenGeometry = screenList.at(i)->geometry(); screens.at(i)->setGeometry(screenGeometry); - if (doVirtualGeometry) - virtualGeometry += screenGeometry; + virtualGeometry += screenGeometry; } - virtualScreen.setGeometry(virtualGeometry.boundingRect()); - Q_Q(QDesktopWidget); - q->setGeometry(virtualScreen.geometry()); + q->setGeometry(virtualGeometry.boundingRect()); } QDesktopWidget::QDesktopWidget() @@ -118,8 +116,6 @@ int QDesktopWidget::numScreens() const QWidget *QDesktopWidget::screen(int screen) { Q_D(QDesktopWidget); - if (QApplicationPrivate::platformIntegration()->isVirtualDesktop()) - return &d->virtualScreen; if (screen < 0 || screen >= d->screens.length()) return d->screens.at(0); return d->screens.at(screen); diff --git a/src/gui/kernel/qdesktopwidget_qpa_p.h b/src/gui/kernel/qdesktopwidget_qpa_p.h index abee8a1..d6ed686 100644 --- a/src/gui/kernel/qdesktopwidget_qpa_p.h +++ b/src/gui/kernel/qdesktopwidget_qpa_p.h @@ -76,7 +76,6 @@ public: void updateScreenList(); QList<QDesktopScreenWidget *> screens; - QDesktopScreenWidget virtualScreen; }; #endif // QDESKTOPWIDGET_QPA_P_H |