Details
-
Bug
-
Resolution: Done
-
P2: Important
-
5.5.1, 5.6.2, 5.7.0
-
None
-
OS X El Capitan 10.11.6
MacBook Pro (Retina, 13-inch, Early 2015)
Qt 5.6.2
Description
When a drag terminates in macOS / OS X, the combined mouse move and button state change events are unpacked and processed as two separate events. These two events have coordinates that are completely unexpected, and incur problems in apps where inadvertent mouse events are handled and the coordinates are taken as being correct.
I have attached a sample project that demonstrates this using both a pure QML drag operation, and a drag operation that's initiated in C++. Both of them, on mouse release (no matter where), emit the two processed events with incorrect coordinates : mouse move & button state change.
Example output starts with a normal mouse move location, and we initiate a drag:
---------------------- MOUSE MOVE local : 72.0781 , 209.148 global : 1433 , -490 window : 72.0781 , 209.148 ---------------------- qml: Cpp Source Rectangle : starting drag qml: Cpp Source Rectangle : drag ended
… this will be followed by two events, both with incorrect / unexpected coordinates:
---------------------- MOUSE MOVE local : 1367 , -962 global : 2728 , -1661 window : 1367 , -962 ---------------------- ---------------------- MOUSE RELEASE local : 1367 , -962 global : 2728 , -1661 window : 1367 , -962 ----------------------
Subsequent events now resume to expected coordinates:
---------------------- MOUSE MOVE local : 72 , 209 global : 1433 , -490 window : 72 , 209 ----------------------
Attachments
For Gerrit Dashboard: QTBUG-57129 | ||||||
---|---|---|---|---|---|---|
# | Subject | Branch | Project | Status | CR | V |
181865,3 | macOS: convey correct mouse coordinates on drag release | 5.8 | qt/qtbase | Status: MERGED | +2 | 0 |