diff options
author | Sami Lempinen <sami.lempinen@nokia.com> | 2011-05-09 12:18:02 (GMT) |
---|---|---|
committer | Sami Lempinen <sami.lempinen@nokia.com> | 2011-05-09 12:18:02 (GMT) |
commit | fa53804c12e692d29421e22e2c59f6aff2d519e7 (patch) | |
tree | 00c6f99ab439e4f75fb52ae48ad8589120965813 /src/gui/kernel/qdesktopwidget_qpa.cpp | |
parent | 97e423b50d316c3a9e2083c3a9d80bf16554faa9 (diff) | |
parent | f57395a27730cbf464b7f9293bcf058a0a481a98 (diff) | |
download | Qt-fa53804c12e692d29421e22e2c59f6aff2d519e7.zip Qt-fa53804c12e692d29421e22e2c59f6aff2d519e7.tar.gz Qt-fa53804c12e692d29421e22e2c59f6aff2d519e7.tar.bz2 |
Merge remote-tracking branch 'qt/4.8'
Diffstat (limited to 'src/gui/kernel/qdesktopwidget_qpa.cpp')
-rw-r--r-- | src/gui/kernel/qdesktopwidget_qpa.cpp | 12 |
1 files changed, 4 insertions, 8 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); |