diff options
author | Tor Arne Vestbø <tor.arne.vestbo@qt.io> | 2017-02-20 12:09:28 +0100 |
---|---|---|
committer | Tor Arne Vestbø <tor.arne.vestbo@qt.io> | 2017-02-20 13:56:12 +0000 |
commit | 2fbe54472e10e42ceebed54cfb42b9b2384b7203 (patch) | |
tree | 53c96e7a1b4e29658e775a7110938126ded8e403 /src/plugins/platforms | |
parent | 3e5d5852ddc45201e721ec513fbc37745c98a78a (diff) |
macOS: Retain foreign windows
Regression after 89842b97d74d1, where the retain was part of setView.
We release m_view in the destructor, regardless of how the view was
acquired, and the non-foreign window retains by being the one creating
the view.
Task-number: QTBUG-59001
Change-Id: I6d9621a63ea6ec2cee008986b0ab72ff61110ad7
Reviewed-by: René J.V. Bertin <rjvbertin@gmail.com>
Reviewed-by: Timur Pocheptsov <timur.pocheptsov@qt.io>
Diffstat (limited to 'src/plugins/platforms')
-rw-r--r-- | src/plugins/platforms/cocoa/qcocoawindow.mm | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/src/plugins/platforms/cocoa/qcocoawindow.mm b/src/plugins/platforms/cocoa/qcocoawindow.mm index 918f376446..60cababba4 100644 --- a/src/plugins/platforms/cocoa/qcocoawindow.mm +++ b/src/plugins/platforms/cocoa/qcocoawindow.mm @@ -472,6 +472,7 @@ QCocoaWindow::QCocoaWindow(QWindow *tlw) if (tlw->type() == Qt::ForeignWindow) { m_view = (NSView *)WId(tlw->property("_q_foreignWinId").value<WId>()); + [m_view retain]; } else { m_view = [[QNSView alloc] initWithCocoaWindow:this]; // Enable high-dpi OpenGL for retina displays. Enabling has the side |