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>
bb10
Timur Pocheptsov 2018-09-28 14:37:35 +02:00
parent a8148e5157
commit e7e8b02728
1 changed files with 1 additions and 0 deletions

View File

@ -218,6 +218,7 @@ QCocoaWindow::~QCocoaWindow()
}
[m_view release];
[m_nsWindow close];
[m_nsWindow release];
}