summaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorGabriel de Dietrich <gabriel.dedietrich@digia.com>2012-11-22 15:56:48 +0100
committerThe Qt Project <gerrit-noreply@qt-project.org>2012-11-22 17:42:32 +0100
commit127c30cbef6800184f4681158f7b3e17fca3cccd (patch)
treef582ff2ae940506efa940bff5b3717e1d1e222b1 /src
parentaba0e53db9cdb7c4c762e567190b039d78b2123f (diff)
Cocoa: Properly set QNSView's geometry when it's a subview
Task-number: QTBUG-26960 Change-Id: Ib8ca76572c868305f378d22c21d13511b4999244 Reviewed-by: Richard Moe Gustavsen <richard.gustavsen@digia.com>
Diffstat (limited to 'src')
-rw-r--r--src/plugins/platforms/cocoa/qcocoawindow.mm3
1 files changed, 3 insertions, 0 deletions
diff --git a/src/plugins/platforms/cocoa/qcocoawindow.mm b/src/plugins/platforms/cocoa/qcocoawindow.mm
index d17df81011..321c0ead4c 100644
--- a/src/plugins/platforms/cocoa/qcocoawindow.mm
+++ b/src/plugins/platforms/cocoa/qcocoawindow.mm
@@ -637,6 +637,9 @@ void QCocoaWindow::recreateWindow(const QPlatformWindow *parentWindow)
// Child windows have no NSWindow, link the NSViews instead.
const QCocoaWindow *parentCococaWindow = static_cast<const QCocoaWindow *>(parentWindow);
[parentCococaWindow->m_contentView addSubview : m_contentView];
+ QRect rect = window()->geometry();
+ NSRect frame = NSMakeRect(rect.x(), rect.y(), rect.width(), rect.height());
+ [m_contentView setFrame:frame];
}
}