cocoa: Don’t trigger security dialog on drag

macOS 10.14+ will display an “Accessibility Access”
security dialog if we generate mouse events, so don’t.

Task-number: QTBUG-68830
Change-Id: If832ca3cd49ec6bdad1a8188feab884b6562e9d2
Reviewed-by: Tor Arne Vestbø <tor.arne.vestbo@qt.io>
bb10
Morten Johan Sørvig 2018-06-17 11:07:37 +02:00
parent 8d99965161
commit cd08753d3e
1 changed files with 5 additions and 1 deletions

View File

@ -1941,7 +1941,11 @@ static QPoint mapWindowCoordinates(QWindow *source, QWindow *target, QPoint poin
[nativeCursor set];
// Make sure the cursor is updated correctly if the mouse does not move and window is under cursor
// by creating a fake move event
// by creating a fake move event, unless on 10.14 and later where doing so will trigger a security
// warning dialog. FIXME: Find a way to update the cursor without fake mouse events.
if (QOperatingSystemVersion::current() >= QOperatingSystemVersion::MacOSMojave)
return;
if (m_updatingDrag)
return;