summaryrefslogtreecommitdiffstats
path: root/src/plugins/platforms/cocoa/qnsview.mm
diff options
context:
space:
mode:
authorIikka Eklund <iikka.eklund@digia.com>2014-04-02 07:36:48 +0200
committerThe Qt Project <gerrit-noreply@qt-project.org>2014-04-02 07:36:48 +0200
commitd6f58e5e17d58c640fc7779652008fda0d66f41d (patch)
treed50d27e260c9eaf4bc2bcb4480b8a069a3aed857 /src/plugins/platforms/cocoa/qnsview.mm
parent83de197a57ff6c3e5bbad26bd871981285384fcb (diff)
parent0ab63b035a649dc1982c867cd37d466d249004b9 (diff)
Merge "Merge remote-tracking branch 'origin/stable' into dev" into refs/staging/dev
Diffstat (limited to 'src/plugins/platforms/cocoa/qnsview.mm')
-rw-r--r--src/plugins/platforms/cocoa/qnsview.mm8
1 files changed, 8 insertions, 0 deletions
diff --git a/src/plugins/platforms/cocoa/qnsview.mm b/src/plugins/platforms/cocoa/qnsview.mm
index 47081ab890..1197aa9148 100644
--- a/src/plugins/platforms/cocoa/qnsview.mm
+++ b/src/plugins/platforms/cocoa/qnsview.mm
@@ -281,6 +281,12 @@ static QTouchDevice *touchDevice = 0;
- (void)notifyWindowStateChanged:(Qt::WindowState)newState
{
+ // If the window was maximized, then fullscreen, then tried to go directly to "normal" state,
+ // this notification will say that it is "normal", but it will still look maximized, and
+ // if you called performZoom it would actually take it back to "normal".
+ // So we should say that it is maximized because it actually is.
+ if (newState == Qt::WindowNoState && m_platformWindow->m_effectivelyMaximized)
+ newState = Qt::WindowMaximized;
QWindowSystemInterface::handleWindowStateChanged(m_window, newState);
// We want to read the window state back from the window,
// but the event we just sent may be asynchronous.
@@ -346,6 +352,8 @@ static QTouchDevice *touchDevice = 0;
- (void)notifyWindowWillZoom:(BOOL)willZoom
{
Qt::WindowState newState = willZoom ? Qt::WindowMaximized : Qt::WindowNoState;
+ if (!willZoom)
+ m_platformWindow->m_effectivelyMaximized = false;
[self notifyWindowStateChanged:newState];
}