diff options
| author | Andrew Forrest <andrewkforrest@gmail.com> | 2025-02-03 16:10:15 +0000 |
|---|---|---|
| committer | Andrew Forrest <andrewkforrest@gmail.com> | 2025-02-05 18:29:14 +0000 |
| commit | d908e043984dcfed3aa80e30cd1cafacd13b644d (patch) | |
| tree | d13960e493d8ab87a35730873994760732febe59 /src/corelib/tools/qrect.cpp | |
| parent | 97049278443860d3dd1b1efd20d1f7dabaf72a35 (diff) | |
Android: Fix mouse button processing
Fixes clicking UI elements with a mouse on Android.
8d8cbe87e21f05b7d611ed4be47299977288b267 introduced changes to support
mouse buttons other than Qt::LeftButton, but the release always looked
like no buttons changed, nor were they tracked (m_buttons is always
Qt::NoButton). Qt was not notified of mouse up, so nothing was clickable.
Now all mouse events go through sendMouseButtonEvents, and the last seen
button state is tracked for every event. If a mouse up with no buttons
occurs, the last seen set of buttons is used instead, so Qt correctly
handles the event. Also adds the mouse button state information to
mouse move events from Android, so the workaround for delivering
Qt::LeftButton when a window is tracking a move while a button is
pressed has been removed.
Tested on a Samsung A1 with a Bluetooth mouse.
Fixes: QTBUG-132700
Fixes: QTBUG-130297
Pick-to: 6.8 6.9
Change-Id: I241282c2915d7e6cf99db7f0bc1ad2d541349077
Reviewed-by: Assam Boudjelthia <assam.boudjelthia@qt.io>
Diffstat (limited to 'src/corelib/tools/qrect.cpp')
0 files changed, 0 insertions, 0 deletions
