From e7e8b027285f2bbc2c8a698095865c2608dd0204 Mon Sep 17 00:00:00 2001 From: Timur Pocheptsov Date: Fri, 28 Sep 2018 14:37:35 +0200 Subject: QCocoaWindow - close the underlying NSWindow before releasing it MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit 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 --- src/plugins/platforms/cocoa/qcocoawindow.mm | 1 + 1 file changed, 1 insertion(+) (limited to 'src/plugins/platforms') 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]; } -- cgit v1.2.3