diff options
author | Janne Anttila <janne.anttila@digia.com> | 2009-08-11 06:11:20 (GMT) |
---|---|---|
committer | Janne Anttila <janne.anttila@digia.com> | 2009-08-11 06:11:20 (GMT) |
commit | 21acca0629c03e6c3cfdfb23441b2b0ac6313a59 (patch) | |
tree | f66d6468c639d536f40274dd8ced1267af981a67 /src/gui/kernel/qwidget_x11.cpp | |
parent | 5b80fbad54eccfc79f38c4f24d6267834b23e742 (diff) | |
parent | 975b75bcda1570adc2aa0d0327c5445b25da1515 (diff) | |
download | Qt-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.cpp | 7 |
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) { |