Handle the Qt::FramelessWindowHint correctly in Cocoa

This fixes a regression introduced by
be405c86f8efac7c6bc8b749725d6d0e0499314d.

Task-number: QTBUG-34988
Change-Id: Id825b51d4d94826819d2405bb711886db3db8bc8
Reviewed-by: Christoph Schleifenbaum <christoph.schleifenbaum@kdab.com>
Reviewed-by: Shawn Rutledge <shawn.rutledge@digia.com>
This commit is contained in:
Andy Shaw 2013-11-20 20:02:21 +01:00 committed by The Qt Project
parent c62efb52b5
commit 0ac9ea83f8

View File

@ -465,8 +465,10 @@ NSUInteger QCocoaWindow::windowStyleMask(Qt::WindowFlags flags)
{
Qt::WindowType type = static_cast<Qt::WindowType>(int(flags & Qt::WindowType_Mask));
NSInteger styleMask = NSBorderlessWindowMask;
if (flags & Qt::FramelessWindowHint)
return styleMask;
if ((type & Qt::Popup) == Qt::Popup) {
if (!windowIsPopupType(type) && !(flags & Qt::FramelessWindowHint))
if (!windowIsPopupType(type))
styleMask = (NSUtilityWindowMask | NSResizableWindowMask | NSClosableWindowMask |
NSMiniaturizableWindowMask | NSTitledWindowMask);
} else {
@ -485,7 +487,7 @@ NSUInteger QCocoaWindow::windowStyleMask(Qt::WindowFlags flags)
} else {
styleMask = NSResizableWindowMask | NSClosableWindowMask | NSTitledWindowMask;
}
} else if (!(flags & Qt::FramelessWindowHint)) {
} else {
if (flags & Qt::WindowMaximizeButtonHint)
styleMask |= NSResizableWindowMask;
if (flags & Qt::WindowTitleHint)