Details
-
Bug
-
Resolution: Done
-
P2: Important
-
5.2.1
-
MacOS 10.9.2
-
-
39be577cc2dee415129d34afffc0b3509371db68 e3cbf0f1962958457f6e09fcfdc92d8cac4b6511
Description
Run the attached sample. Then do this:
1) click shortly inside the window, without moving the mouse before releasing the mouse button.
2) under 1 second after releasing the mouse button, move the mouse.
...Q_ASSERT is triggered. This means the mouse button state is not synced with the move event.
In my sample application, the qSleep(1000) is to simulate any application procedure that would take time. After that procedure, the application receive a mouse move event with a wrong button state, and that can cause trouble.
This only happens on the Mac, however I think the problem lies in:
qtbase\src\gui\kernel\qguiapplication.cpp
in method QGuiApplicationPrivate::processMouseEvent
The line:
mouse_buttons = buttons = e->buttons;
is not executed for a pure move event. I think this is wrong.
By moving this line so that it is always executed, the problem is solved.
Attachments
Issue Links
- replaces
-
QTBUG-40642 wrong position in mousePressEvent (different behavior between Qt 4 and Qt 5)
-
- Closed
-