From a6ebc9b34ab7e463dac758e465f930e285003d2a Mon Sep 17 00:00:00 2001
From: Timur Pocheptsov <Timur.Pocheptsov@digia.com>
Date: Fri, 10 Oct 2014 13:23:14 +0200
Subject: [PATCH] OS X - maximize app's window from the Dock or using cmd-tab
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit

On OS X it's possible to maximize app's window by clicking on an app's
icon in the Dock.
Another trick is to use cmd-tab to select an app +,
while still holding the 'cmd' key, press the 'option' key -
this should also maximize a window.
None of these works at the moment, and to enable these features app
delegate should return YES from the

-applicationShouldHandleRepopen:hasVisibleWindows:.

method.

Task-number: QTBUG-40084
Change-Id: I33ba9e74d55d41d23deb429612519b746d461d9e
Reviewed-by: Timur Pocheptsov <Timur.Pocheptsov@digia.com>
Reviewed-by: Morten Johan Sørvig <morten.sorvig@digia.com>
Reviewed-by: Laszlo Agocs <laszlo.agocs@digia.com>
---
 src/plugins/platforms/cocoa/qcocoaapplicationdelegate.mm | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/src/plugins/platforms/cocoa/qcocoaapplicationdelegate.mm b/src/plugins/platforms/cocoa/qcocoaapplicationdelegate.mm
index 326628a2614..9f7609f24c8 100644
--- a/src/plugins/platforms/cocoa/qcocoaapplicationdelegate.mm
+++ b/src/plugins/platforms/cocoa/qcocoaapplicationdelegate.mm
@@ -396,7 +396,7 @@ static void cleanupCocoaApplicationDelegate()
      */
     QWindowSystemInterface::handleApplicationStateChanged(Qt::ApplicationActive, true /*forcePropagate*/);
 
-    return NO;
+    return YES;
 }
 
 - (void)setReflectionDelegate:(NSObject <NSApplicationDelegate> *)oldDelegate
-- 
GitLab