summaryrefslogtreecommitdiffstats
path: root/src/gui/kernel/qcocoawindowdelegate_mac.mm
diff options
context:
space:
mode:
Diffstat (limited to 'src/gui/kernel/qcocoawindowdelegate_mac.mm')
-rw-r--r--src/gui/kernel/qcocoawindowdelegate_mac.mm20
1 files changed, 20 insertions, 0 deletions
diff --git a/src/gui/kernel/qcocoawindowdelegate_mac.mm b/src/gui/kernel/qcocoawindowdelegate_mac.mm
index 2b9cf85..ffba6c2 100644
--- a/src/gui/kernel/qcocoawindowdelegate_mac.mm
+++ b/src/gui/kernel/qcocoawindowdelegate_mac.mm
@@ -394,5 +394,25 @@ static void cleanupCocoaWindowDelegate()
}
return NO;
}
+
+- (void)syncContentViewFrame: (NSNotification *)notification
+{
+ NSView *cView = [notification object];
+ if (cView) {
+ NSWindow *window = [cView window];
+ QWidget *qwidget = m_windowHash->value(window);
+ if (qwidget) {
+ QWidgetData *widgetData = qt_qwidget_data(qwidget);
+ NSRect rect = [cView frame];
+ const QSize newSize(rect.size.width, rect.size.height);
+ const QSize &oldSize = widgetData->crect.size();
+ if (newSize != oldSize) {
+ [self syncSizeForWidget:qwidget toSize:newSize fromSize:oldSize];
+ }
+ }
+
+ }
+}
+
@end
#endif// QT_MAC_USE_COCOA