summaryrefslogtreecommitdiffstats
path: root/src/gui/kernel/qwidget_x11.cpp
diff options
context:
space:
mode:
authorJanne Anttila <janne.anttila@digia.com>2009-08-11 06:11:20 (GMT)
committerJanne Anttila <janne.anttila@digia.com>2009-08-11 06:11:20 (GMT)
commit21acca0629c03e6c3cfdfb23441b2b0ac6313a59 (patch)
treef66d6468c639d536f40274dd8ced1267af981a67 /src/gui/kernel/qwidget_x11.cpp
parent5b80fbad54eccfc79f38c4f24d6267834b23e742 (diff)
parent975b75bcda1570adc2aa0d0327c5445b25da1515 (diff)
downloadQt-21acca0629c03e6c3cfdfb23441b2b0ac6313a59.zip
Qt-21acca0629c03e6c3cfdfb23441b2b0ac6313a59.tar.gz
Qt-21acca0629c03e6c3cfdfb23441b2b0ac6313a59.tar.bz2
Merge branch 'master' of git@scm.dev.troll.no:qt/qt-s60-public
Diffstat (limited to 'src/gui/kernel/qwidget_x11.cpp')
-rw-r--r--src/gui/kernel/qwidget_x11.cpp7
1 files changed, 7 insertions, 0 deletions
diff --git a/src/gui/kernel/qwidget_x11.cpp b/src/gui/kernel/qwidget_x11.cpp
index 2bb3626..056e26b 100644
--- a/src/gui/kernel/qwidget_x11.cpp
+++ b/src/gui/kernel/qwidget_x11.cpp
@@ -512,6 +512,13 @@ void QWidgetPrivate::create_sys(WId window, bool initializeWindow, bool destroyO
dialog = popup = false; // force these flags off
data.crect.setRect(0, 0, sw, sh);
} else if (topLevel && !q->testAttribute(Qt::WA_Resized)) {
+ QDesktopWidget *desktopWidget = qApp->desktop();
+ if (desktopWidget->isVirtualDesktop()) {
+ QRect r = desktopWidget->screenGeometry();
+ sw = r.width();
+ sh = r.height();
+ }
+
int width = sw / 2;
int height = 4 * sh / 10;
if (extra) {