Handle the Qt::FramelessWindowHint correctly in Cocoa
This fixes a regression introduced by
be405c86f8.
Task-number: QTBUG-34988
Change-Id: Id825b51d4d94826819d2405bb711886db3db8bc8
Reviewed-by: Christoph Schleifenbaum <christoph.schleifenbaum@kdab.com>
Reviewed-by: Shawn Rutledge <shawn.rutledge@digia.com>
bb10
parent
c62efb52b5
commit
0ac9ea83f8
|
|
@ -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)
|
||||
|
|
|
|||
Loading…
Reference in New Issue