diff options
author | Gunnar Sletta <gunnar@trolltech.com> | 2009-11-13 08:07:29 +0100 |
---|---|---|
committer | Gunnar Sletta <gunnar@trolltech.com> | 2009-11-13 08:07:29 +0100 |
commit | 3794e55c2c8427dd8bd4f86af5e894cc80267881 (patch) | |
tree | 9067656d5e021a585a976fb84f73b94e161cae19 /src/gui/kernel/qcocoawindowdelegate_mac.mm | |
parent | 7be079e1b1f13b58f5d69f86e5854edd25065532 (diff) | |
parent | 99b19431e6846a36a65f23d21a95140a081d1f1a (diff) | |
download | qt4-tools-3794e55c2c8427dd8bd4f86af5e894cc80267881.tar.gz |
Merge branch '4.6' of git@scm.dev.nokia.troll.no:qt/qt into 4.6
Conflicts:
dist/changes-4.6.0
Diffstat (limited to 'src/gui/kernel/qcocoawindowdelegate_mac.mm')
-rw-r--r-- | src/gui/kernel/qcocoawindowdelegate_mac.mm | 12 |
1 files changed, 12 insertions, 0 deletions
diff --git a/src/gui/kernel/qcocoawindowdelegate_mac.mm b/src/gui/kernel/qcocoawindowdelegate_mac.mm index 803a1b1c83..9fb674e0cf 100644 --- a/src/gui/kernel/qcocoawindowdelegate_mac.mm +++ b/src/gui/kernel/qcocoawindowdelegate_mac.mm @@ -307,6 +307,18 @@ static void cleanupCocoaWindowDelegate() return m_windowHash->value(window); } +- (BOOL)windowShouldZoom:(NSWindow *)window toFrame:(NSRect)newFrame +{ + Q_UNUSED(newFrame); + // saving the current window geometry before the window is maximized + QWidget *qwidget = m_windowHash->value(window); + if (qwidget->isWindow() && !(qwidget->windowState() & Qt::WindowMaximized)) { + QWidgetPrivate *widgetPrivate = qt_widget_private(qwidget); + widgetPrivate->topData()->normalGeometry = qwidget->geometry(); + } + return YES; +} + - (NSRect)windowWillUseStandardFrame:(NSWindow *)window defaultFrame:(NSRect)defaultFrame { NSRect frameToReturn = defaultFrame; |