From 9ea919915dcb859400504920e6cedde378c8c9bf Mon Sep 17 00:00:00 2001 From: Morten Johan Sorvig Date: Fri, 25 May 2012 07:44:22 +0200 Subject: 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 Reviewed-by: Bradley T. Hughes --- src/plugins/platforms/cocoa/qcocoawindow.mm | 7 +++++++ 1 file changed, 7 insertions(+) (limited to 'src/plugins/platforms') diff --git a/src/plugins/platforms/cocoa/qcocoawindow.mm b/src/plugins/platforms/cocoa/qcocoawindow.mm index 880292b24a..1a8e08e77d 100644 --- a/src/plugins/platforms/cocoa/qcocoawindow.mm +++ b/src/plugins/platforms/cocoa/qcocoawindow.mm @@ -460,6 +460,13 @@ NSWindow * QCocoaWindow::createNSWindow() defer:NO]; // Deferring window creation breaks OpenGL (the GL context is set up // before the window is shown and needs a proper window.). [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; createdWindow = window; } else { -- cgit v1.2.3