diff options
author | Timur Pocheptsov <timur.pocheptsov@qt.io> | 2018-09-28 14:37:35 +0200 |
---|---|---|
committer | Timur Pocheptsov <timur.pocheptsov@qt.io> | 2018-10-05 14:17:00 +0000 |
commit | e7e8b027285f2bbc2c8a698095865c2608dd0204 (patch) | |
tree | 5b2599d51289e7e861c77a9496b0c0ac109d65f1 /src/plugins | |
parent | a8148e51577df281491cd1c60f428ade9b4def11 (diff) |
QCocoaWindow - close the underlying NSWindow before releasing it
Normally, when deleting a widget, setVisible(false) calls -orderOut:
and then ~QCocoaWindow will call -release, as a result the window
will disappear from the screen and will be deallocated. But -orderOut:
has no effect on minimized/iconified window. As a result, a 'zombie'
window still can be seen on screen, while all Qt-thingies already
deleted/dead. The similar behavior can be reproduced with a native
NSWindow where we do not call -orderOut:/-close and only call -release.
To fix this - we call -close.
Task-number: QTBUG-70794
Change-Id: Iee8e1fc98018885f1f6e9628d966843d21ac7d38
Reviewed-by: Morten Johan Sørvig <morten.sorvig@qt.io>
Diffstat (limited to 'src/plugins')
-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 1de8577ebe..b2d1a80097 100644 --- a/src/plugins/platforms/cocoa/qcocoawindow.mm +++ b/src/plugins/platforms/cocoa/qcocoawindow.mm @@ -218,6 +218,7 @@ QCocoaWindow::~QCocoaWindow() } [m_view release]; + [m_nsWindow close]; [m_nsWindow release]; } |