QCocoaWindow::windowStyleMask: make popups non-resizable

Otherwise, context menu can be resized.

Pick-to: 6.4 6.2
Task-number: QTBUG-106925
Change-Id: I409d0113fd92ca89b14f068c391dd9c0ddb79ce7
Reviewed-by: Tor Arne Vestbø <tor.arne.vestbo@qt.io>
This commit is contained in:
Timur Pocheptsov 2022-10-06 13:57:07 +02:00
parent 8b143f0aed
commit e17372e723

View File

@ -526,9 +526,11 @@ NSUInteger QCocoaWindow::windowStyleMask(Qt::WindowFlags flags)
// working (for example minimizing frameless windows, or resizing // working (for example minimizing frameless windows, or resizing
// windows that don't have zoom or fullscreen titlebar buttons). // windows that don't have zoom or fullscreen titlebar buttons).
styleMask |= NSWindowStyleMaskClosable styleMask |= NSWindowStyleMaskClosable
| NSWindowStyleMaskResizable
| NSWindowStyleMaskMiniaturizable; | NSWindowStyleMaskMiniaturizable;
if (type != Qt::Popup) // We only care about popups exactly.
styleMask |= NSWindowStyleMaskResizable;
if (type == Qt::Tool) if (type == Qt::Tool)
styleMask |= NSWindowStyleMaskUtilityWindow; styleMask |= NSWindowStyleMaskUtilityWindow;