Details
-
Bug
-
Resolution: Done
-
P2: Important
-
5.0.2
-
None
-
Cocoa, 32 bit
-
-
ba75f604499d3c4fc15930731814fdb9415fdc83
Description
In 4.x it was possible to have a Qt::Tool window without title bar, by specifying Qt::Tool | Qt::CustomizeWindowHint or Qt::Tool| Qt::FramelessWindowHint.
This is not possible anymore (while it is on Windows). As an example, this breaks the Qt example:
qtbase\examples\widgets\mainwindows\mainwindow\mainwindow.pro
if you run this example and make floating the window with a custom titme bar, you will see the standard Mac window on top, which is wrong. This was not so in 4.8.
I propose the following fix that works for me:
in file qtbase\src\plugins\platforms\cocoa\qcocoawindow.mm
in API QCocoaWindow::windowStyleMask
Replace
if (!windowIsPopupType(type))
styleMask = (NSUtilityWindowMask | NSResizableWindowMask | NSClosableWindowMask |
NSMiniaturizableWindowMask | NSTitledWindowMask);
with
if (!windowIsPopupType(type)) if (flags & Qt::FramelessWindowHint) styleMask = NSUtilityWindowMask; else styleMask = (NSUtilityWindowMask | NSResizableWindowMask | NSClosableWindowMask | NSMiniaturizableWindowMask | NSTitledWindowMask);