Send LeaveEvent as reaction to WM_POINTERLEAVE to reset hover states
Currently items can get stuck in a hovered state when all fingers are lifted from a touchscreen. This is because we don't react to the WM_POINTERLEAVE event from Windows. With this patch we translate a WM_POINTERLEAVE event to a LeaveEvent to remove the hover state from QtQuick items. Fixes: QTBUG-62912 Pick-to: 6.5 6.6 Change-Id: I8a6fb6b7ec77457854a75e20277565d1eb89bab6 Reviewed-by: Wladimir Leuschner <wladimir.leuschner@qt.io> Reviewed-by: Jan Arve Sæther <jan-arve.saether@qt.io>bb10
parent
7993321e76
commit
ef7d809eaf
|
|
@ -441,6 +441,8 @@ bool QWindowsPointerHandler::translateTouchEvent(QWindow *window, HWND hwnd,
|
|||
if (id != -1)
|
||||
m_lastTouchPoints.remove(id);
|
||||
}
|
||||
// Send LeaveEvent to reset hover when the last finger leaves the touch screen (QTBUG-62912)
|
||||
QWindowSystemInterface::handleEnterLeaveEvent(nullptr, window);
|
||||
}
|
||||
|
||||
// Only handle down/up/update, ignore others like WM_POINTERENTER, WM_POINTERLEAVE, etc.
|
||||
|
|
|
|||
Loading…
Reference in New Issue