summaryrefslogtreecommitdiffstats
path: root/src/plugins/platforms/cocoa/qcocoawindow.mm
diff options
context:
space:
mode:
authorQt Forward Merge Bot <qt_forward_merge_bot@qt-project.org>2019-02-21 01:00:08 +0100
committerQt Forward Merge Bot <qt_forward_merge_bot@qt-project.org>2019-02-21 01:00:08 +0100
commit0c0c4a23bc55619c59d2cd0ccd4d4b19bb1fea59 (patch)
tree0e56c0e3a3acb05232949b6a5d3e18feb48eb25e /src/plugins/platforms/cocoa/qcocoawindow.mm
parenta4b8e7141b3dd3bf3c2ac139b44ece0f74b054d8 (diff)
parent904617dfb83f39a6a379635b64fea6fcd00f241a (diff)
Merge remote-tracking branch 'origin/5.12' into 5.13
Diffstat (limited to 'src/plugins/platforms/cocoa/qcocoawindow.mm')
-rw-r--r--src/plugins/platforms/cocoa/qcocoawindow.mm8
1 files changed, 7 insertions, 1 deletions
diff --git a/src/plugins/platforms/cocoa/qcocoawindow.mm b/src/plugins/platforms/cocoa/qcocoawindow.mm
index fc772181f0..ff2c4de985 100644
--- a/src/plugins/platforms/cocoa/qcocoawindow.mm
+++ b/src/plugins/platforms/cocoa/qcocoawindow.mm
@@ -401,6 +401,11 @@ void QCocoaWindow::setVisible(bool visible)
}
}
+ // Note: We do not guard the order out by checking NSWindow.visible, as AppKit will
+ // in some cases, such as when hiding the application, order out and make a window
+ // invisible, but keep it in a list of "hidden windows", that it then restores again
+ // when the application is unhidden. We need to call orderOut explicitly, to bring
+ // the window out of this "hidden list".
[m_view.window orderOut:nil];
if (m_view.window == [NSApp keyWindow] && !eventDispatcher()->hasModalSession()) {
@@ -1540,7 +1545,8 @@ QCocoaNSWindow *QCocoaWindow::createNSWindow(bool shouldBePanel)
// Deferring window creation breaks OpenGL (the GL context is
// set up before the window is shown and needs a proper window)
backing:NSBackingStoreBuffered defer:NO
- screen:cocoaScreen->nativeScreen()];
+ screen:cocoaScreen->nativeScreen()
+ platformWindow:this];
Q_ASSERT_X(nsWindow.screen == cocoaScreen->nativeScreen(), "QCocoaWindow",
"Resulting NSScreen should match the requested NSScreen");