From cd08753d3e2ac02663ba0ab588d7d926f7438475 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Morten=20Johan=20S=C3=B8rvig?= Date: Sun, 17 Jun 2018 11:07:37 +0200 Subject: =?UTF-8?q?cocoa:=20Don=E2=80=99t=20trigger=20security=20dialog=20?= =?UTF-8?q?on=20drag?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit 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ø --- src/plugins/platforms/cocoa/qnsview.mm | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/src/plugins/platforms/cocoa/qnsview.mm b/src/plugins/platforms/cocoa/qnsview.mm index c88ffc76d7..1c400a1ec9 100644 --- a/src/plugins/platforms/cocoa/qnsview.mm +++ b/src/plugins/platforms/cocoa/qnsview.mm @@ -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; -- cgit v1.2.3