macOS: Don’t show hidden windows while z-ordering
Calling [NSWindow orderBack] will make the window visible again, and will e.g. bring back closed menus on application modality changes. Fixes: QTBUG-77281 Change-Id: I2f89b852ea9f8ab34c709cec96d93fe305984fb9 Reviewed-by: Timur Pocheptsov <timur.pocheptsov@qt.io> Reviewed-by: Tor Arne Vestbø <tor.arne.vestbo@qt.io> (cherry picked from commit 3729695cc9d550e831567772441ad55bd767ab1a)
This commit is contained in:
parent
4f116f00fc
commit
811465032b
@ -92,7 +92,8 @@ void QCocoaWindowManager::modalSessionChanged()
|
|||||||
if (NSApp.modalWindow) {
|
if (NSApp.modalWindow) {
|
||||||
// Lower window to that of the modal windows, but no less
|
// Lower window to that of the modal windows, but no less
|
||||||
nativeWindow.level = NSModalPanelWindowLevel;
|
nativeWindow.level = NSModalPanelWindowLevel;
|
||||||
[nativeWindow orderBack:nil];
|
if ([nativeWindow isVisible])
|
||||||
|
[nativeWindow orderBack:nil];
|
||||||
} else {
|
} else {
|
||||||
// Restore window's natural window level, whatever that was
|
// Restore window's natural window level, whatever that was
|
||||||
nativeWindow.level = naturalWindowLevel;
|
nativeWindow.level = naturalWindowLevel;
|
||||||
|
Loading…
x
Reference in New Issue
Block a user