diff options
| author | Qt Continuous Integration System <qt-info@nokia.com> | 2010-05-17 00:30:12 (GMT) |
|---|---|---|
| committer | Qt Continuous Integration System <qt-info@nokia.com> | 2010-05-17 00:30:12 (GMT) |
| commit | bdbe09ad2c01ae11d10511b51f8d7a3dfb27b17c (patch) | |
| tree | fbe4f71381c380f295a959fac6c5ce72a62ba20c /src/gui/kernel/qwidget.cpp | |
| parent | 6100e83f3cbf40199da3078c1954a4dc1f77cb8f (diff) | |
| parent | 040ad2dc679ebfb3dec7685edf617fc57bb66ccf (diff) | |
| download | Qt-bdbe09ad2c01ae11d10511b51f8d7a3dfb27b17c.zip Qt-bdbe09ad2c01ae11d10511b51f8d7a3dfb27b17c.tar.gz Qt-bdbe09ad2c01ae11d10511b51f8d7a3dfb27b17c.tar.bz2 | |
Merge branch '4.7' of scm.dev.nokia.troll.no:qt/oslo-staging-1 into 4.7-integration
* '4.7' of scm.dev.nokia.troll.no:qt/oslo-staging-1: (24 commits)
Empty commit to trigger a rebuild in the CI system
Use case-insensitive comparison for the "data" scheme in URLs
tst_bic: Fix building on Mac 64
Fix building of tst_QTcpSocket
Autotest: some improvements to timeout testing of tst_QTcpSocket
Revert "Optimized pixmapcache key generation for icons and styles"
Revert "More improvements to pixmap cache key generation"
More improvements to pixmap cache key generation
More 4.7 stuff.
Fix for autotest failure in qwidget::saveRestoreGeometry()
Optimized pixmapcache key generation for icons and styles
doc: Another upgrade of the top page and overviews.
Mac: restoreGeometry()
[Regression] Build failure on Mac Carbon
doc: Added some \briefs to how-to docs.
Some 4.7 changes.
Updated changelog.
Cherry pick fix for MOBILITY-932 from Qt Mobility.
Cherry pick fix for MOBILITY-962 from Qt Mobility.
Cherry pick fix for MOBILITY-828 from Qt Mobility.
...
Diffstat (limited to 'src/gui/kernel/qwidget.cpp')
| -rw-r--r-- | src/gui/kernel/qwidget.cpp | 22 |
1 files changed, 22 insertions, 0 deletions
diff --git a/src/gui/kernel/qwidget.cpp b/src/gui/kernel/qwidget.cpp index 4a9fa94..1f2cd8c 100644 --- a/src/gui/kernel/qwidget.cpp +++ b/src/gui/kernel/qwidget.cpp @@ -1581,6 +1581,11 @@ void QWidgetPrivate::createTLExtra() x->inTopLevelResize = false; x->inRepaint = false; x->embedded = 0; +#ifdef Q_WS_MAC +#ifdef QT_MAC_USE_COCOA + x->wasMaximized = false; +#endif // QT_MAC_USE_COCOA +#endif // Q_WS_MAC createTLSysExtra(); #ifdef QWIDGET_EXTRA_DEBUG static int count = 0; @@ -6720,6 +6725,18 @@ void QWidget::setGeometry(const QRect &r) */ QByteArray QWidget::saveGeometry() const { +#ifdef QT_MAC_USE_COCOA + // We check if the window was maximized during this invocation. If so, we need to record the + // starting position as 0,0. + Q_D(const QWidget); + QRect newFramePosition = frameGeometry(); + QRect newNormalPosition = normalGeometry(); + if(d->topData()->wasMaximized && !(windowState() & Qt::WindowMaximized)) { + // Change the starting position + newFramePosition.moveTo(0, 0); + newNormalPosition.moveTo(0, 0); + } +#endif // QT_MAC_USE_COCOA QByteArray array; QDataStream stream(&array, QIODevice::WriteOnly); stream.setVersion(QDataStream::Qt_4_0); @@ -6729,8 +6746,13 @@ QByteArray QWidget::saveGeometry() const stream << magicNumber << majorVersion << minorVersion +#ifdef QT_MAC_USE_COCOA + << newFramePosition + << newNormalPosition +#else << frameGeometry() << normalGeometry() +#endif // QT_MAC_USE_COCOA << qint32(QApplication::desktop()->screenNumber(this)) << quint8(windowState() & Qt::WindowMaximized) << quint8(windowState() & Qt::WindowFullScreen); |
