Make popup windows show on the correct desktop.

Set NSWindowCollectionBehaviorFullScreenAuxiliary
for Qt::Popup windows. This will make them show
on the same desktop as their parent full-screen
window.

Change-Id: Ice1bd50976ef0cd66b01a683a43e08e782573153
Reviewed-by: Christoph Schleifenbaum <christoph.schleifenbaum@kdab.com>
Reviewed-by: Bradley T. Hughes <bradley.hughes@nokia.com>
This commit is contained in:
Morten Johan Sorvig 2012-05-25 07:44:22 +02:00 committed by Qt by Nokia
parent 96c5b5ecf4
commit 9ea919915d

View File

@ -460,6 +460,13 @@ NSWindow * QCocoaWindow::createNSWindow()
defer:NO]; // Deferring window creation breaks OpenGL (the GL context is set up defer:NO]; // Deferring window creation breaks OpenGL (the GL context is set up
// before the window is shown and needs a proper window.). // before the window is shown and needs a proper window.).
[window setHasShadow:YES]; [window setHasShadow:YES];
#if MAC_OS_X_VERSION_MAX_ALLOWED >= MAC_OS_X_VERSION_10_7
if (QSysInfo::QSysInfo::MacintoshVersion >= QSysInfo::MV_10_7) {
// Make popup winows show on the same desktop as the parent full-screen window.
[window setCollectionBehavior:NSWindowCollectionBehaviorFullScreenAuxiliary];
}
#endif
window->m_cocoaPlatformWindow = this; window->m_cocoaPlatformWindow = this;
createdWindow = window; createdWindow = window;
} else { } else {