summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorTim Blechmann <tim@klingt.org>2015-12-11 22:28:57 +0100
committerTim Blechmann <tim@klingt.org>2015-12-15 10:00:20 +0000
commit0150cd3617bca177ecfbd65379c8c0ed6e2fe6ed (patch)
treed8c8071e0116f8e5b658ba582871121ae71db623
parent40804ad86876865b67d10f937a4de2a3cc9978e8 (diff)
QCocoaWindow - resize embedded views
when QCocoaWindow::setCocoaGeometry is called on windows embedded into a native cocoa gui, QPlatformWindow::setGeometry does not apply the geometry. we therefore need to set the frame on the embedded view manually. related tasks: Task-number: QTBUG-47632 Task-number: QTBUG-45269 Change-Id: I976e4606d36bb4afc74b0834105bceab8a6f8cbd Reviewed-by: Morten Johan Sørvig <morten.sorvig@theqtcompany.com>
-rw-r--r--src/plugins/platforms/cocoa/qcocoawindow.mm6
1 files changed, 5 insertions, 1 deletions
diff --git a/src/plugins/platforms/cocoa/qcocoawindow.mm b/src/plugins/platforms/cocoa/qcocoawindow.mm
index 5a59a842c6..3b5909a37e 100644
--- a/src/plugins/platforms/cocoa/qcocoawindow.mm
+++ b/src/plugins/platforms/cocoa/qcocoawindow.mm
@@ -503,7 +503,11 @@ void QCocoaWindow::setCocoaGeometry(const QRect &rect)
QMacAutoReleasePool pool;
if (m_contentViewIsEmbedded) {
- QPlatformWindow::setGeometry(rect);
+ if (m_qtView) {
+ [m_qtView setFrame:NSMakeRect(0, 0, rect.width(), rect.height())];
+ } else {
+ QPlatformWindow::setGeometry(rect);
+ }
return;
}