summaryrefslogtreecommitdiffstats
path: root/src/plugins
diff options
context:
space:
mode:
authorStefan Wastl <stefan.wastl@native-instruments.de>2022-05-02 15:21:41 +0200
committerTor Arne Vestbø <tor.arne.vestbo@qt.io>2022-05-06 17:09:25 +0200
commit67b9baac52f7078af772f76b15743080282b48ef (patch)
treecf02198bd5232682be86eb58d17e26459991f642 /src/plugins
parenta783c3d574a1400c4dfdd32975fc511f095df8b2 (diff)
macOS: Forward hover-events for embedded windows
If a QWindow is embedded into a native view it's effectively the root window, similar to a top level QWindow, and we need to forward hover events on behalf of itself and all child windows. Fixes: QTBUG-103084 Pick-to: 6.3 Change-Id: I1e94b9447fb561c1b02db87738de235c5d12b3a4 Reviewed-by: Tor Arne Vestbø <tor.arne.vestbo@qt.io> Reviewed-by: <stefan.wastl@native-instruments.de>
Diffstat (limited to 'src/plugins')
-rw-r--r--src/plugins/platforms/cocoa/qnsview_mouse.mm8
1 files changed, 4 insertions, 4 deletions
diff --git a/src/plugins/platforms/cocoa/qnsview_mouse.mm b/src/plugins/platforms/cocoa/qnsview_mouse.mm
index c0063f81a9..5f78a416b2 100644
--- a/src/plugins/platforms/cocoa/qnsview_mouse.mm
+++ b/src/plugins/platforms/cocoa/qnsview_mouse.mm
@@ -607,8 +607,8 @@ static const QPointingDevice *pointingDeviceFor(qint64 deviceID)
// in time (s_windowUnderMouse). The latter is also used to also send out enter/leave
// events when the application is activated/deactivated.
- // Top-level windows generate enter events for sub-windows.
- if (!m_platformWindow->isContentView())
+ // Root (top level or embedded) windows generate enter events for sub-windows
+ if (!m_platformWindow->isContentView() && !m_platformWindow->isEmbedded())
return;
QPointF windowPoint;
@@ -634,8 +634,8 @@ static const QPointingDevice *pointingDeviceFor(qint64 deviceID)
if (!m_platformWindow)
return;
- // Top-level windows generate leave events for sub-windows.
- if (!m_platformWindow->isContentView())
+ // Root (top level or embedded) windows generate enter events for sub-windows
+ if (!m_platformWindow->isContentView() && !m_platformWindow->isEmbedded())
return;
QCocoaWindow *windowToLeave = QCocoaWindow::s_windowUnderMouse;