summaryrefslogtreecommitdiffstats
path: root/src/plugins/platforms/cocoa/qnswindowdelegate.mm
diff options
context:
space:
mode:
authorGabriel de Dietrich <gabriel.dedietrich@digia.com>2013-06-03 18:33:03 +0200
committerThe Qt Project <gerrit-noreply@qt-project.org>2013-06-12 10:09:13 +0200
commitb8c007ede01360594ec5399532f2229e82715cc3 (patch)
tree6c91bcc110be17bdd6796c0d3b88c949674e1511 /src/plugins/platforms/cocoa/qnswindowdelegate.mm
parent7ee15bfbb815df87ae0526f105a13a591b192c76 (diff)
Cocoa: Update window state when maximizing from the title bar
There's no NSWindow notification we can listen to, but we can override behavior from its delegate. Change-Id: I61cebf4119f83c770fe4e7f45ff0d4e8bf9d0df9 Reviewed-by: Richard Moe Gustavsen <richard.gustavsen@digia.com>
Diffstat (limited to 'src/plugins/platforms/cocoa/qnswindowdelegate.mm')
-rw-r--r--src/plugins/platforms/cocoa/qnswindowdelegate.mm8
1 files changed, 8 insertions, 0 deletions
diff --git a/src/plugins/platforms/cocoa/qnswindowdelegate.mm b/src/plugins/platforms/cocoa/qnswindowdelegate.mm
index 8e17936a78..10536bd5f4 100644
--- a/src/plugins/platforms/cocoa/qnswindowdelegate.mm
+++ b/src/plugins/platforms/cocoa/qnswindowdelegate.mm
@@ -90,4 +90,12 @@
return YES;
}
+- (BOOL)windowShouldZoom:(NSWindow *)window toFrame:(NSRect)newFrame
+{
+ Q_UNUSED(newFrame);
+ if (m_cocoaWindow && m_cocoaWindow->m_qtView)
+ [m_cocoaWindow->m_qtView notifyWindowWillZoom:![window isZoomed]];
+ return YES;
+}
+
@end