diff options
Diffstat (limited to 'src/gui/kernel')
-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; } |