summaryrefslogtreecommitdiffstats
path: root/tests
diff options
context:
space:
mode:
authorBradley T. Hughes <bradley.hughes@nokia.com>2009-08-06 10:17:40 (GMT)
committerBradley T. Hughes <bradley.hughes@nokia.com>2009-08-06 10:18:57 (GMT)
commitcb484634624d227feacc71c0463899968317c2d1 (patch)
treeec779da404ec1831e220c02220baf47bcd9065fe /tests
parent69597149e606a3d8a22a2ea7c2964b799751d898 (diff)
downloadQt-cb484634624d227feacc71c0463899968317c2d1.zip
Qt-cb484634624d227feacc71c0463899968317c2d1.tar.gz
Qt-cb484634624d227feacc71c0463899968317c2d1.tar.bz2
Support _NET_WORKAREA on Xinerama setups in QDesktopWidget
Instead of ignoring _NET_WORKAREA, merge it with each screen geometry to give a meaningful availableGeometry() for all screens. Reviewed-by: denis
Diffstat (limited to 'tests')
-rw-r--r--tests/auto/qdesktopwidget/tst_qdesktopwidget.cpp12
1 files changed, 10 insertions, 2 deletions
diff --git a/tests/auto/qdesktopwidget/tst_qdesktopwidget.cpp b/tests/auto/qdesktopwidget/tst_qdesktopwidget.cpp
index c6fac8d..d2b0d8a 100644
--- a/tests/auto/qdesktopwidget/tst_qdesktopwidget.cpp
+++ b/tests/auto/qdesktopwidget/tst_qdesktopwidget.cpp
@@ -99,9 +99,17 @@ void tst_QDesktopWidget::availableGeometry()
{
QDesktopWidget desktop;
- QRect total = desktop.screenGeometry();
- QRect available = desktop.availableGeometry();
+ QRect total;
+ QRect available;
+ for (int i = 0; i < desktop.screenCount(); ++i) {
+ total = desktop.screenGeometry(i);
+ available = desktop.availableGeometry(i);
+ QVERIFY(total.contains(available));
+ }
+
+ total = desktop.screenGeometry();
+ available = desktop.availableGeometry();
QVERIFY(total.contains(available));
QCOMPARE(desktop.availableGeometry(desktop.primaryScreen()), available);
QCOMPARE(desktop.screenGeometry(desktop.primaryScreen()), total);