Go to file
Tor Arne Vestbø f4889e63c7 macOS: Rework worksWhenModal and update on modal session change
Instead of basing the worksWhenModal property on the window type, which
will include both windows inside the current modal session (as intend),
but also windows below the current modal session (wrongly), we check
to see if the window is a transient child of the current top level
modal window.

Going via NSApp.modalWindow means we also catch cases where the top
level modal session is run by a native window, not part of the modal
session stack in the Cocoa event dispatcher.

The new logic relies on windows such as popups, dialogs, etc to set
the correct transient parent, but this seems to be the case already.

To ensure the window tag is also updated, we call setWorksWhenModal
on modal session changes. We could change worksWhenModal into e.g.
shouldWorkWhenModal and always use the setter, but that would mean
the initial window tag update in [NSWindow _commonAwake] would pick
up the incorrect value. And if the window tag is not updated after
that due to the workaround in [QNSPanel setWorksWhenModal:] being
compiled out, the window would not be possible to order front,
which is worse than being able to order front a window with
worksWhenModal=NO.

Fixes: QTBUG-76654
Task-number: QTBUG-71480
Change-Id: I38b14422d274dcc03b4c7d5ef87066e282ed9111
Reviewed-by: Timur Pocheptsov <timur.pocheptsov@qt.io>
Reviewed-by: Tor Arne Vestbø <tor.arne.vestbo@qt.io>
2020-04-17 13:29:17 +02:00
bin syncqt: Ignore deprecation macros when resolving class names 2020-04-14 10:14:37 +00:00
config.tests Merge remote-tracking branch 'origin/5.14' into 5.15 2019-10-16 01:00:49 +02:00
dist Add changes file for Qt 5.14.2 2020-03-17 06:16:25 +01:00
doc Doc: Adjust offline style for the litehtml rendering engine 2020-03-26 15:28:31 +01:00
examples Stop using obsolete TouchPoint rect accessors in tests and examples 2020-04-10 13:54:43 +00:00
lib Purge all fonts 2015-08-18 19:59:14 +00:00
mkspecs WASM: Replace NO_EXIT_RUNTIME=0 with EXIT_RUNTIME=1 2020-04-08 22:41:32 +02:00
qmake qmake: Document QML_FOREIGN_METATYPES 2020-03-26 13:51:44 +01:00
src macOS: Rework worksWhenModal and update on modal session change 2020-04-17 13:29:17 +02:00
tests macOS: Remove a bunch of dead (forward) declarations 2020-04-15 17:33:06 +02:00
util Fix parameter order in cldr2qlocalexml.py's usage() 2020-04-06 14:29:32 +02:00
.gitattributes Update the git-archive export options 2012-09-07 15:39:31 +02:00
.gitignore qfloat16: Check in the tables to Git 2019-06-03 10:42:53 -07:00
.qmake.conf Bump version 2020-02-02 13:41:14 +01:00
.tag Update the git-archive export options 2012-09-07 15:39:31 +02:00
config_help.txt Merge remote-tracking branch 'origin/5.14' into 5.15 2020-02-18 09:26:53 +01:00
configure Pass SDK root to the linker as -isysroot, not -Wl,-syslibroot 2020-04-02 18:33:42 +02:00
configure.bat Configure: simplify logic 2019-03-14 12:13:58 +00:00
configure.json Merge remote-tracking branch 'origin/5.14' into 5.15 2020-02-18 09:26:53 +01:00
configure.pri configure: Add switch for clang's "source-based" code coverage feature 2020-01-28 20:26:15 +00:00
header.BSD Use placeholder for year in header.* files 2018-04-16 11:02:22 +00:00
header.COMM Use placeholder for year in header.* files 2018-04-16 11:02:22 +00:00
header.FDL Use placeholder for year in header.* files 2018-04-16 11:02:22 +00:00
header.GPL Use placeholder for year in header.* files 2018-04-16 11:02:22 +00:00
header.GPL-EXCEPT Use placeholder for year in header.* files 2018-04-16 11:02:22 +00:00
header.LGPL Use placeholder for year in header.* files 2018-04-16 11:02:22 +00:00
header.LGPL3 Use placeholder for year in header.* files 2018-04-16 11:02:22 +00:00
header.LGPL3-COMM Use placeholder for year in header.* files 2018-04-16 11:02:22 +00:00
header.LGPL-NOGPL2 Use placeholder for year in header.* files 2018-04-16 11:02:22 +00:00
header.LGPL-ONLY Use placeholder for year in header.* files 2018-04-16 11:02:22 +00:00
header.MIT qsimd: add support for new x86 CPU features 2018-05-05 06:20:07 +00: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
qtbase.pro nuke configure -host-option 2016-12-13 18:55:59 +00:00
sync.profile Add QPasswordDigestor to syncqt 2019-12-12 12:43:56 +01:00