summaryrefslogtreecommitdiffstats
path: root/src/plugins/platforms
diff options
context:
space:
mode:
authorNils Jeisecke <jeisecke@saltation.de>2013-07-26 17:51:42 +0200
committerThe Qt Project <gerrit-noreply@qt-project.org>2013-07-30 17:24:15 +0200
commitcf3e435299ef2705fb217279bb5e93847cfc7d8c (patch)
treedde9b3eb3ee4a8262f325df25836a128bc5c09c9 /src/plugins/platforms
parent5d192deed9ef7289e44cd936576d98b3afa2601a (diff)
Cocoa: Make sure that resizeEvent is invoked after calling resize
The QWindow::resizeEvent documentation states that resizeEvent is invoked after the windowing system has acknowledged a setGeometry() or resize() request. The Cocoa plugin however did set the platform window geometry immediately so that the qnsview's updateGeometry returned too early. Task-number: QTBUG-32706 Change-Id: I1f359ab368833d174ab6740f4467b0848c290f13 Reviewed-by: Friedemann Kleint <Friedemann.Kleint@digia.com> Reviewed-by: Gunnar Sletta <gunnar.sletta@digia.com>
Diffstat (limited to 'src/plugins/platforms')
-rw-r--r--src/plugins/platforms/cocoa/qcocoawindow.mm7
1 files changed, 5 insertions, 2 deletions
diff --git a/src/plugins/platforms/cocoa/qcocoawindow.mm b/src/plugins/platforms/cocoa/qcocoawindow.mm
index 057eb7e144..bba5b6fdf1 100644
--- a/src/plugins/platforms/cocoa/qcocoawindow.mm
+++ b/src/plugins/platforms/cocoa/qcocoawindow.mm
@@ -267,7 +267,6 @@ void QCocoaWindow::setGeometry(const QRect &rect)
#ifdef QT_COCOA_ENABLE_WINDOW_DEBUG
qDebug() << "QCocoaWindow::setGeometry" << this << rect;
#endif
- QPlatformWindow::setGeometry(rect);
setCocoaGeometry(rect);
}
@@ -275,8 +274,10 @@ void QCocoaWindow::setCocoaGeometry(const QRect &rect)
{
QCocoaAutoReleasePool pool;
- if (m_contentViewIsEmbedded)
+ if (m_contentViewIsEmbedded) {
+ QPlatformWindow::setGeometry(rect);
return;
+ }
if (m_nsWindow) {
NSRect bounds = qt_mac_flipRect(rect, window());
@@ -284,6 +285,8 @@ void QCocoaWindow::setCocoaGeometry(const QRect &rect)
} else {
[m_contentView setFrame : NSMakeRect(rect.x(), rect.y(), rect.width(), rect.height())];
}
+
+ // will call QPlatformWindow::setGeometry(rect) during resize confirmation (see qnsview.mm)
}
void QCocoaWindow::setVisible(bool visible)