summaryrefslogtreecommitdiffstats
path: root/src/plugins/platforms/windows
diff options
context:
space:
mode:
authorCaroline Chao <caroline.chao@digia.com>2013-03-12 09:24:16 +0100
committerThe Qt Project <gerrit-noreply@qt-project.org>2013-03-12 15:59:21 +0100
commita410273fabb294b46b04f7ccee38bab668413061 (patch)
tree23859f6c3c2e770880fcf71edfc88114f62f05fa /src/plugins/platforms/windows
parentec9c0faefd43b099bf7472daa932a865ddf8112c (diff)
Fix wrong initial position
If the widget is larger than the screen, its title bar top left corner will be shown inside the screen. Task-number: QTBUG-30142 Change-Id: Id93773874be3616b3ef4b9bee6e1bb751c541d7b Reviewed-by: Caroline Chao <caroline.chao@digia.com> Reviewed-by: Shawn Rutledge <shawn.rutledge@digia.com>
Diffstat (limited to 'src/plugins/platforms/windows')
-rw-r--r--src/plugins/platforms/windows/qwindowswindow.cpp5
1 files changed, 5 insertions, 0 deletions
diff --git a/src/plugins/platforms/windows/qwindowswindow.cpp b/src/plugins/platforms/windows/qwindowswindow.cpp
index 2da0af8abb..6cbe3e8cf7 100644
--- a/src/plugins/platforms/windows/qwindowswindow.cpp
+++ b/src/plugins/platforms/windows/qwindowswindow.cpp
@@ -487,6 +487,11 @@ QWindowsWindow::WindowData
const QWindowCreationContextPtr context(new QWindowCreationContext(w, rect, data.customMargins, style, exStyle));
QWindowsContext::instance()->setWindowCreationContext(context);
+ if (context->frameX < 0)
+ context->frameX = 0;
+ if (context->frameY < 0)
+ context->frameY = 0;
+
if (QWindowsContext::verboseWindows)
qDebug().nospace()
<< "CreateWindowEx: " << w << *this