Go to file
Tor Arne Vestbø 8a4e274dcf macOS: Keep NSWindow alive after handling windowShouldClose callback
Option-clicking the close-button on a window in macOS is a request to
batch-close all the windows. When this happens we get an event in through
the window that was clicked, which in turn results in AppKit calling
windowShouldClose: for each window. We respond to that by explicitly
closing each window (instead of just responding YES or NO), which
results in the window being released and deallocated. This causes
a crash when AppKit then follows up by closing each window after we
responded YES to windowShouldClose.

We work around this by keeping the window alive in the closest auto
release pool, which is typically at the level of the runloop. This
ensures that the window is alive for the duration of the logic that
AppKit has for batch-closing windows.

Fixes: QTBUG-92232
Pick-to: 6.2 6.1 5.15
Change-Id: I68b6138eb8325af0576b438ffa011137fec27926
Reviewed-by: Alexandru Croitor <alexandru.croitor@qt.io>
2021-06-09 16:13:54 +02:00
.github/workflows Github Actions: many minor updates 2021-01-22 18:48:54 +01:00
bin CMake: Allow usage of QtStandaloneTestTemplateProject as package component 2021-04-23 13:31:04 +02:00
cmake CMake: Fix global 'apk' target to apply to Qt EXTERNAL_BUILD examples 2021-06-08 22:37:50 +02:00
coin Increase the timeout for test targets for enforce exit code yaml 2021-06-04 18:16:09 +00:00
config.tests Add runtime ARM64 AES check 2021-05-20 18:31:05 +00:00
dist Add Qt 6.0.0 changes file 2020-11-16 10:02:08 +02:00
doc Doc: CSS: Update selectors for target highlighting 2021-06-07 16:44:23 +01:00
examples Use new permission api for http example 2021-06-07 14:59:14 +03:00
lib Purge all fonts 2015-08-18 19:59:14 +00:00
libexec CMake: Make qt-internal-configure-tests relocatable 2021-04-26 23:11:28 +02:00
mkspecs qmake: Switch to using Xcode's new build system 2021-06-08 17:28:47 +02:00
qmake qmake: fix MSVC build error when QT_FEATURE_static_runtime is ON 2021-05-19 04:03:46 +08:00
src macOS: Keep NSWindow alive after handling windowShouldClose callback 2021-06-09 16:13:54 +02:00
tests tst_QNetworkReply::ignoreSslErrorsList, use the right error 2021-06-08 16:17:23 +02:00
util Report unused enum members after CLDR data scan 2021-06-07 17:14:14 +02:00
.cmake.conf Bump version 2021-02-18 07:20:21 +02:00
.gitattributes Give batch files CRLF line endings 2020-11-04 15:02:29 +00:00
.gitignore .gitignore: Qt Creator files cleanup 2020-09-25 07:50:15 +02:00
.lgtm.yml Skip LGTM analysis for the bootstrap library and tools 2020-07-16 01:04:34 +02:00
.prev_configure.cmake Add runtime ARM64 AES check 2021-05-20 18:31:05 +00:00
.prev_qt_cmdline.cmake CMake: Regenerate configure.cmake files 2020-09-28 15:48:17 +02:00
.qmake.conf Bump version 2021-02-18 07:20:21 +02:00
.tag Update the git-archive export options 2012-09-07 15:39:31 +02:00
CMakeLists.txt CMake: Fix global 'apk' target to actually build all apks 2021-06-08 22:37:50 +02:00
conanfile.py Add conanfile.py to support builds with Conan package manager 2021-05-24 14:24:34 +03:00
config_help.txt Allow to load -developer-build without configurations into an IDE 2021-05-07 21:06:58 +02:00
configure Remove the -qmake and -cmake configure arguments 2021-03-11 16:39:50 +01:00
configure.bat Remove superfluous variable assignments from configure.bat 2021-03-11 16:39:54 +01:00
configure.cmake wasm: fix up compiler message 2021-06-08 09:26:04 +10:00
configure.json Add runtime ARM64 AES check 2021-05-20 18:31:05 +00:00
dependencies.yaml Re-add dependencies.yaml now that qt5.git wip/qt6 builds fine 2019-09-18 13:19:31 +02:00
INSTALL INSTALL: Remove outdated reference to Windows CE 2019-02-13 13:01:57 +00:00
LICENSE.FDL Initial import from the monolithic Qt. 2011-04-27 12:05:43 +02:00
LICENSE.GPL2 Add new license header templates and license files 2016-01-14 20:43:46 +00:00
LICENSE.GPL3 Add new license header templates and license files 2016-01-14 20:43:46 +00:00
LICENSE.GPL3-EXCEPT Add new license header templates and license files 2016-01-14 20:43:46 +00:00
LICENSE.LGPL3 Add new license header templates and license files 2016-01-14 20:43:46 +00:00
LICENSE.LGPLv3 Remove LICENSE.GPLv3, LICENSE.LGPLv21, LGPL_EXCEPTION.txt 2018-04-16 11:02:14 +00:00
LICENSE.QT-LICENSE-AGREEMENT Update enterprise license agreement v4.2.1 2019-12-18 13:07:19 +02:00
qt_cmdline.cmake CMake: Build minimal subset of tests in desktop static builds 2021-04-06 09:15:37 +01:00
sync.profile Implement propagation of object files to the end-point executable 2021-05-27 14:28:17 +02:00