summaryrefslogtreecommitdiffstats
path: root/tests/auto/corelib/animation/qsequentialanimationgroup/CMakeLists.txt
diff options
context:
space:
mode:
authorTor Arne Vestbø <tor.arne.vestbo@qt.io>2023-03-13 18:34:15 +0100
committerTor Arne Vestbø <tor.arne.vestbo@qt.io>2023-03-20 17:39:18 +0100
commit1bde2036051b3aaf5896ef1ff50c08c11ea1eba9 (patch)
tree6768953aa960cf875e65daf0d910d6d447bbc0e0 /tests/auto/corelib/animation/qsequentialanimationgroup/CMakeLists.txt
parent3bedeb837ef68e0062668406e7662ed9ffc5268a (diff)
macOS: Disable interaction for modally blocked transient parent windows
When a window-modal window has a transient ancestor, Qt treats this ancestor window as modally blocked by the modal window, as if it had been a true non-transient parent of the modal window. Unfortunately, this is not how macOS natively behaves. Window-modal windows only block their direct parent, and AppKit will happily send events to any other top level window. This is different from how application modal windows work, where NSApplication will filter many events (but not all) in [[NSApplication _modalSession:sendEvent:]. Note that NSWindow.worksWhenModal has no effect in this situation, as that property is only considered by AppKit for application modal session are active (and NSApp.modalWidow returns non-nil). Instead of trying to replicate the event filtering that AppKit does, which would be fragile, we disable some of the effects these events could potentially have, by for example preventing modally blocked windows from becoming key, and temporarily disabling the close button in the title bar. One remaining issue is that, unlike with application modal windows, the modally blocked transient parents can still be ordered above the modal window. Fixing this requires informing the window server about the modally blocked state of the window, which we can't do using public APIs. Even returning NO from [NSWindow _allowsOrdering] is not sufficient. Task-number: QTBUG-104905 Pick-to: 6.5 Change-Id: I7e764a354f397ae6ef61304ca5442a4e1bb7589c Reviewed-by: Volker Hilsheimer <volker.hilsheimer@qt.io>
Diffstat (limited to 'tests/auto/corelib/animation/qsequentialanimationgroup/CMakeLists.txt')
0 files changed, 0 insertions, 0 deletions