diff options
author | Gunnar Sletta <gunnar@trolltech.com> | 2009-12-01 08:17:32 (GMT) |
---|---|---|
committer | Gunnar Sletta <gunnar@trolltech.com> | 2009-12-01 08:17:32 (GMT) |
commit | b5b9faa7cdc877f8ab32a8d5ae480b5857761409 (patch) | |
tree | 0d09f4e554aa01da3714cdc96af707a49b44ed93 /src/gui/kernel/qcocoawindowdelegate_mac.mm | |
parent | 4f4f1e612488f400b2b139eaf7fea940fb6d7e7c (diff) | |
parent | bc992c8e40fcfdcfe0015dd88dda77c318c10a55 (diff) | |
download | Qt-b5b9faa7cdc877f8ab32a8d5ae480b5857761409.zip Qt-b5b9faa7cdc877f8ab32a8d5ae480b5857761409.tar.gz Qt-b5b9faa7cdc877f8ab32a8d5ae480b5857761409.tar.bz2 |
Merge branch '4.6' of scm.dev.nokia.troll.no:qt/oslo-staging-2 into 4.6
Diffstat (limited to 'src/gui/kernel/qcocoawindowdelegate_mac.mm')
-rw-r--r-- | src/gui/kernel/qcocoawindowdelegate_mac.mm | 9 |
1 files changed, 7 insertions, 2 deletions
diff --git a/src/gui/kernel/qcocoawindowdelegate_mac.mm b/src/gui/kernel/qcocoawindowdelegate_mac.mm index 9fb674e..8a22a65 100644 --- a/src/gui/kernel/qcocoawindowdelegate_mac.mm +++ b/src/gui/kernel/qcocoawindowdelegate_mac.mm @@ -324,8 +324,13 @@ static void cleanupCocoaWindowDelegate() NSRect frameToReturn = defaultFrame; QWidget *qwidget = m_windowHash->value(window); QSizeF size = qwidget->maximumSize(); - frameToReturn.size.width = qMin<CGFloat>(frameToReturn.size.width, size.width()); - frameToReturn.size.height = qMin<CGFloat>(frameToReturn.size.height, size.height()); + NSRect windowFrameRect = [window frame]; + NSRect viewFrameRect = [[window contentView] frame]; + // consider additional size required for titlebar & frame + frameToReturn.size.width = qMin<CGFloat>(frameToReturn.size.width, + size.width()+(windowFrameRect.size.width - viewFrameRect.size.width)); + frameToReturn.size.height = qMin<CGFloat>(frameToReturn.size.height, + size.height()+(windowFrameRect.size.height - viewFrameRect.size.height)); return frameToReturn; } |