summaryrefslogtreecommitdiffstats
path: root/src/gui/kernel/qwidget_x11.cpp
diff options
context:
space:
mode:
authorJason Barron <jbarron@trolltech.com>2009-08-10 11:47:28 (GMT)
committerJason Barron <jbarron@trolltech.com>2009-08-10 11:47:28 (GMT)
commit0df5d5e4367a8052082897d02b4f00429d5cc4c1 (patch)
treecc8a59f0e37dbd618270bbca5b644fc3b775d60a /src/gui/kernel/qwidget_x11.cpp
parentf61ec84fc296c6f70011e30788ee511d6b6a18c6 (diff)
parent17bffacda99055831bb4c8c6e7da39ec15415519 (diff)
downloadQt-0df5d5e4367a8052082897d02b4f00429d5cc4c1.zip
Qt-0df5d5e4367a8052082897d02b4f00429d5cc4c1.tar.gz
Qt-0df5d5e4367a8052082897d02b4f00429d5cc4c1.tar.bz2
Merge commit 'qt/master'
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) {