Details
-
Bug
-
Resolution: Fixed
-
P2: Important
-
None
-
5.15.13, 5.15.17, 6.7.2
Description
Condition to reproduce error:
QApplicationPrivate::inPopupMode() == true ** e.g. a contextmenu is open
If a popup is displayed and a touch event occurs outside the menu e.g. on the background widget this event is ignored. On Microsoft Windows the touchdevice generates after the touch event a mousebuttonpress event. This event is forwarded to the menu, which hides the popup, also the mousebuttonrelease event is send to the popup. In QWidgetWindow::handleMouseEvent a comment can be find "// the popup disappeared, replay the mouse press event". The following code will generate a new MousePressEvent which is posted in the eventloop. Because the popup window is already closed the mousepressevent is forwarded to the background widget where the user touched the screen. Problem, no mousereleaseevent is send to this widget.
In the simple example attached the background widget changes its color depending on the incomming event. On MouseButtonPress color is set to green, on MouseButtonRelease to red. As you can see, only a MousePressEvent reaches the widget, color is set to green.
If the user touched the button "pushMe", the button stays in state "pressed"