From b8c007ede01360594ec5399532f2229e82715cc3 Mon Sep 17 00:00:00 2001 From: Gabriel de Dietrich Date: Mon, 3 Jun 2013 18:33:03 +0200 Subject: 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 --- src/plugins/platforms/cocoa/qnswindowdelegate.mm | 8 ++++++++ 1 file changed, 8 insertions(+) (limited to 'src/plugins/platforms/cocoa/qnswindowdelegate.mm') 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 -- cgit v1.2.3