diff options
author | Shawn Rutledge <shawn.rutledge@digia.com> | 2013-04-09 14:13:36 +0200 |
---|---|---|
committer | The Qt Project <gerrit-noreply@qt-project.org> | 2013-04-09 20:10:59 +0200 |
commit | 4bcec703c4869b1e093aa8a54180b7a6145bbca2 (patch) | |
tree | 47c1daabf706009d2febfaf45913357defded19f /src/plugins/platforms/cocoa/qcocoawindow.mm | |
parent | 34fadcfeb164153a37af97cd46a3a049ed5574e5 (diff) |
OSX window: set QWindow geometry after native window is created
Initial window position is at 0,0 by default, then it's corrected
in createNSWindow (by calling initialGeometry). After window
creation, QNSWindowDelegate will receive the windowDidMove
notification and call QCocoaWindow::windowDidMove() which then
calls QNSView::updateGeometry(). It will not call
QWindowSystemInterface::handleGeometryChange() because the window
is still being constructed. So we can fix this by directly
setting QWindow::geometry in the QCocoaWindow constructor.
Task-number: QTBUG-30382
Change-Id: I3db7a6e83693e5787ae82dcab1767de938d2e5d1
Reviewed-by: Gabriel de Dietrich <gabriel.dedietrich@digia.com>
Diffstat (limited to 'src/plugins/platforms/cocoa/qcocoawindow.mm')
-rw-r--r-- | src/plugins/platforms/cocoa/qcocoawindow.mm | 3 |
1 files changed, 1 insertions, 2 deletions
diff --git a/src/plugins/platforms/cocoa/qcocoawindow.mm b/src/plugins/platforms/cocoa/qcocoawindow.mm index b75f822e2d..4e567c6c63 100644 --- a/src/plugins/platforms/cocoa/qcocoawindow.mm +++ b/src/plugins/platforms/cocoa/qcocoawindow.mm @@ -211,9 +211,8 @@ QCocoaWindow::QCocoaWindow(QWindow *tlw) m_qtView = [[QNSView alloc] initWithQWindow:tlw platformWindow:this]; m_contentView = m_qtView; setGeometry(tlw->geometry()); - recreateWindow(parent()); - + tlw->setGeometry(geometry()); m_inConstructor = false; } |