Don't send hover events from trackpad touches if mouse emulation is on


A QInputDevice::DeviceType::TouchPad that also claims the MouseEmulation
capability will send mouse events following the touch event. These mouse
events are a better representation of the mouse position at any given
time, so we don't want to update internal lastMousePosition or send
hover events based on the touch event.

For example, on a Mac trackpad the mouse events are typically
accelerated, and will match the cursor position, while the touch events
are not, and will lag behind the actual cursor.

This discrepancy resulted in toggling NSView.allowedTouchTypes on and
off on every mouse/touch move, when the mouse was outside the window,
but the touch not, since the two didn't agree about the global "mouse"
position.

Pick-to: 6.12
Change-Id: I16e7d56afc367a2aa83eed04e916e7ed5389d03b
Reviewed-by: Richard Moe Gustavsen <richard.gustavsen@qt.io>
commit8acce25cfabd79b5147fb3f8953b6a2033019099
parentb29b83e853774d1b396275a40c23e83390d86b47
authorTor Arne Vestbø <tor.arne.vestbo@qt.io>
committerTor Arne Vestbø <tor.arne.vestbo@qt.io>
commit timeTue, 20 Oct 2026 21:46:03 +0000