diff options
author | Andy Shaw <andy.shaw@digia.com> | 2013-07-08 09:53:00 +0200 |
---|---|---|
committer | The Qt Project <gerrit-noreply@qt-project.org> | 2013-07-08 19:40:26 +0200 |
commit | e576779a537e5e60d1495b6d690561cce8f4cb3b (patch) | |
tree | e2195561225d7fba24f07c7b4eec06b1fd18bc02 /tests/auto/qwidget | |
parent | 7b7c321d5f35b6ee70db5a72d5d37e19e125d7cf (diff) |
Mac: Handle the maximizing of the window ourselves when it is frameless
On Mac we need to make a frameless window appear maximized manually
rather than letting the underlying Cocoa API deal with it because
it would overwise not appear correctly.
The test is only done for Mac due to the fact that it is not
giving reliable results on other platforms and the source code
change is Mac specific anyway.
Change-Id: Id48a67ba70bfb4bdc921256f1a80328615c98a6b
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@digia.com>
Reviewed-by: Gabriel de Dietrich <gabriel.dedietrich@digia.com>
Diffstat (limited to 'tests/auto/qwidget')
-rw-r--r-- | tests/auto/qwidget/tst_qwidget.cpp | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/tests/auto/qwidget/tst_qwidget.cpp b/tests/auto/qwidget/tst_qwidget.cpp index 9cd257fe32..0dc7441652 100644 --- a/tests/auto/qwidget/tst_qwidget.cpp +++ b/tests/auto/qwidget/tst_qwidget.cpp @@ -2052,6 +2052,15 @@ void tst_QWidget::showMaximized() } #endif #endif // QT3_SUPPORT +#ifdef Q_WS_MAC // Only do this on Mac because it's still not getting accurate results elsewhere + { + QWidget w; + w.setWindowFlags(Qt::FramelessWindowHint); + w.showMaximized(); + QTest::qWaitForWindowShown(&w); + QCOMPARE(w.geometry(), QApplication::desktop()->availableGeometry(&w)); + } +#endif } void tst_QWidget::showFullScreen() |