diff options
author | Morten Johan Sørvig <morten.sorvig@theqtcompany.com> | 2015-05-13 21:04:27 +0200 |
---|---|---|
committer | Timur Pocheptsov <Timur.Pocheptsov@digia.com> | 2015-06-02 04:44:28 +0000 |
commit | f7047d52da47a8426189d0aff8c5104b23cbfd89 (patch) | |
tree | 36bbdf0b71d66f1ea7ca025c2a19a480a2d5e9e7 /src/plugins/platforms | |
parent | 6b4c1ad58cfc3a67e4f4474c1faa89359b8b636c (diff) |
Cocoa: add QT_MAC_USE_NSWINDOW env. variable
When enabled, all QWindows will be backed by a NSWindow.
This is unlike the default where only top-level
QWindows get a NSWindow.
The QWindow still has (Q)NSView as the NSWindow content
view. The return value of the winId functions are
still the NSView and is not affected by this switch.
Change-Id: I131b89af04c09451a6e7515d1da3f7498f53979a
Reviewed-by: Gabriel de Dietrich <gabriel.dedietrich@theqtcompany.com>
Reviewed-by: Timur Pocheptsov <Timur.Pocheptsov@digia.com>
Diffstat (limited to 'src/plugins/platforms')
-rw-r--r-- | src/plugins/platforms/cocoa/qcocoawindow.mm | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/src/plugins/platforms/cocoa/qcocoawindow.mm b/src/plugins/platforms/cocoa/qcocoawindow.mm index 86959869cc..495d5831f7 100644 --- a/src/plugins/platforms/cocoa/qcocoawindow.mm +++ b/src/plugins/platforms/cocoa/qcocoawindow.mm @@ -1254,7 +1254,9 @@ QCocoaGLContext *QCocoaWindow::currentContext() const void QCocoaWindow::recreateWindow(const QPlatformWindow *parentWindow) { bool wasNSWindowChild = m_isNSWindowChild; - m_isNSWindowChild = parentWindow && (window()->property("_q_platform_MacUseNSWindow").toBool()); + BOOL requestNSWindowChild = qt_mac_resolveOption(NO, window(), "_q_platform_MacUseNSWindow", + "QT_MAC_USE_NSWINDOW"); + m_isNSWindowChild = parentWindow && requestNSWindowChild; bool needsNSWindow = m_isNSWindowChild || !parentWindow; QCocoaWindow *oldParentCocoaWindow = m_parentCocoaWindow; |