macOS: Don't make frameless tool windows miniaturizable
Amends 556fbbea6e, which breaks
translucency of frameless tool windows. Possibly a bug in macOS, a
window being made miniaturizable should not have side effects on
background or translucency.
Pick-to: 6.2 6.1 5.15
Fixes: QTBUG-95042
Task-number: QTBUG-65637
Change-Id: I651196e3cf8a9c59b250e5f1b4064cc4ded02372
Reviewed-by: Richard Moe Gustavsen <richard.gustavsen@qt.io>
Reviewed-by: Tor Arne Vestbø <tor.arne.vestbo@qt.io>
bb10
parent
d52bb250c3
commit
e71a5d5cc3
|
|
@ -525,8 +525,10 @@ NSUInteger QCocoaWindow::windowStyleMask(Qt::WindowFlags flags)
|
|||
if (frameless) {
|
||||
// Frameless windows do not display the traffic lights buttons for
|
||||
// e.g. minimize, however StyleMaskMiniaturizable is required to allow
|
||||
// programatic minimize.
|
||||
styleMask |= NSWindowStyleMaskMiniaturizable;
|
||||
// programatic minimize. However, for framless tool windows (e.g. dock windows)
|
||||
// we don't want that, as it breaks translucency.
|
||||
if (type != Qt::Tool)
|
||||
styleMask |= NSWindowStyleMaskMiniaturizable;
|
||||
} else if (flags & Qt::CustomizeWindowHint) {
|
||||
if (flags & Qt::WindowTitleHint)
|
||||
styleMask |= NSWindowStyleMaskTitled;
|
||||
|
|
|
|||
Loading…
Reference in New Issue