diff options
author | Warwick Allison <warwick.allison@nokia.com> | 2009-11-27 00:09:00 (GMT) |
---|---|---|
committer | Warwick Allison <warwick.allison@nokia.com> | 2009-11-27 00:09:00 (GMT) |
commit | 1efae63bf7cba55526c91dcff3139d0a10885efc (patch) | |
tree | d07e1a5db7b2726bbc5d941da3ed97097820b8ca /src/gui/kernel/qcocoawindowdelegate_mac.mm | |
parent | 249bb31dc9fa12acff44ebf0effbdaedc43b5305 (diff) | |
parent | 41f1276392444b9e46b30f3537a8a63af6fffc9d (diff) | |
download | Qt-1efae63bf7cba55526c91dcff3139d0a10885efc.zip Qt-1efae63bf7cba55526c91dcff3139d0a10885efc.tar.gz Qt-1efae63bf7cba55526c91dcff3139d0a10885efc.tar.bz2 |
Merge branch '4.6' of git://scm.dev.nokia.troll.no/qt/qt into kinetic-declarativeui
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; } |