Uploaded image for project: 'Qt'
  1. Qt
  2. QTBUG-56156

xcb: mouse motion event in which a button is pressed is treated as a button press

    XMLWordPrintable

Details

    • Bug
    • Resolution: Done
    • Not Evaluated
    • 5.8.0 Beta
    • 5.7
    • QPA: X11/XCB
    • None
    • Arch Linux 64-bit with touchscreen
    • 157ee01a8d0be9a4dbac03883c9eaf3609fc1172

    Description

      When I press on the touchscreen, since I'm using a modern XI2, I don't expect to get synthesized mouse press from the X server - and I don't get it, directly. Nevertheless, the mouse cursor moves, and there seems to be a synthesized left mouse button state in the move event. QGuiApplicationPrivate::processMouseEvent() doesn't check whether the mouse event is a press, a release or a move; if the button state is different than the state it knew about, it creates a QPA mouseButtonEvent and calls processMouseEvent. The result is that Qt Quick sees a touch event and then a real, actual, non-synthesized mouse button press! That's problematic. If there was only XI_Motion but not XI_ButtonPress, maybe we shouldn't report a press. Or at least it should have MouseEventSynthesizedBySystem or MouseEventSynthesizedByQt so that QtQuick can ignore it.

      1  QWindowSystemInterface::handleMouseEvent  qwindowsysteminterface.cpp 181  0x7ffff6791c70 
      2  QXcbWindow::handleMouseEvent              qxcbwindow.cpp             2510 0x7ffff7ea8db8 
      3  QXcbWindow::handleMotionNotifyEvent       qxcbwindow.cpp             2389 0x7ffff7ea823f 
      4  QXcbWindow::handleXIMouseEvent            qxcbwindow.cpp             2463 0x7ffff7ea896e 
      5  QXcbConnection::xi2HandleEvent            qxcbconnection_xi2.cpp     559  0x7ffff7ebdf9b 
      6  QXcbConnection::handleXcbEvent            qxcbconnection.cpp         1229 0x7ffff7e7ee9d 
      7  QXcbConnection::processXcbEvents          qxcbconnection.cpp         1743 0x7ffff7e809be 
      8  QXcbConnection::qt_static_metacall        moc_qxcbconnection.cpp     188  0x7ffff7eca8a2 
      9  QMetaCallEvent::placeMetaCall             qobject.cpp                502  0x7ffff6334e8b 
      10 QObject::event                            qobject.cpp                1263 0x7ffff6335f0a 
      11 QXcbConnection::event                     qxcbconnection.cpp         2341 0x7ffff7e81dab 
      12 QCoreApplicationPrivate::notify_helper    qcoreapplication.cpp       1122 0x7ffff62fbe0a 
      13 doNotify                                  qcoreapplication.cpp       1063 0x7ffff62fba8d 
      14 QCoreApplication::notify                  qcoreapplication.cpp       1049 0x7ffff62fba00 
      15 QGuiApplication::notify                   qguiapplication.cpp        1663 0x7ffff67b01c2 
      16 QCoreApplication::notifyInternal2         qcoreapplication.cpp       988  0x7ffff62fb990 
      17 QCoreApplication::sendEvent               qcoreapplication.h         231  0x7ffff62ff9fc 
      18 QCoreApplicationPrivate::sendPostedEvents qcoreapplication.cpp       1636 0x7ffff62fcdaf 
      19 QCoreApplication::sendPostedEvents        qcoreapplication.cpp       1490 0x7ffff62fc72c 
      20 postEventSourceDispatch                   qeventdispatcher_glib.cpp  276  0x7ffff6378054 
      21 g_main_context_dispatch                                                   0x7ffff3d45e67 
      22 ??                                                                        0x7ffff3d460d0 
      23 g_main_context_iteration                                                  0x7ffff3d4617c 
      24 QEventDispatcherGlib::processEvents       qeventdispatcher_glib.cpp  423  0x7ffff637880b 
      25 QPAEventDispatcherGlib::processEvents     qeventdispatcher_glib.cpp  121  0x7ffff7ecbb2e 
      26 QEventLoop::processEvents                 qeventloop.cpp             134  0x7ffff62f8372 
      27 QEventLoop::exec                          qeventloop.cpp             212  0x7ffff62f866e 
      28 QCoreApplication::exec                    qcoreapplication.cpp       1261 0x7ffff62fc0da 
      29 main                                      main.cpp                   598  0x4071fd       
      

      ...

      1   QQuickWindowPrivate::deliverPressEvent           qquickwindow.cpp           2282 0x7fffe95a4a49 
      2   QQuickWindowPrivate::deliverMouseEvent           qquickwindow.cpp           1647 0x7fffe95a1058 
      3   QQuickWindowPrivate::deliverPointerEvent         qquickwindow.cpp           2126 0x7fffe95a3b4d 
      4   QQuickWindowPrivate::handleMouseEvent            qquickwindow.cpp           2019 0x7fffe95a351c 
      5   QQuickWindow::mousePressEvent                    qquickwindow.cpp           1985 0x7fffe95a319b 
      6   QWindow::event                                   qwindow.cpp                2041 0x7ffff67c2d43 
      7   QQuickWindow::event                              qquickwindow.cpp           1566 0x7fffe95a0a90 
      8   QCoreApplicationPrivate::notify_helper           qcoreapplication.cpp       1122 0x7ffff62fbe0a 
      9   doNotify                                         qcoreapplication.cpp       1063 0x7ffff62fba8d 
      10  QCoreApplication::notify                         qcoreapplication.cpp       1049 0x7ffff62fba00 
      11  QGuiApplication::notify                          qguiapplication.cpp        1663 0x7ffff67b01c2 
      12  QCoreApplication::notifyInternal2                qcoreapplication.cpp       988  0x7ffff62fb990 
      13  QCoreApplication::sendSpontaneousEvent           qcoreapplication.h         234  0x7ffff67b85e6 
      14  QGuiApplicationPrivate::processMouseEvent        qguiapplication.cpp        1925 0x7ffff67b0fa0 
      15  QGuiApplicationPrivate::processMouseEvent        qguiapplication.cpp        1828 0x7ffff67b0831 
      16  QGuiApplicationPrivate::processWindowSystemEvent qguiapplication.cpp        1708 0x7ffff67b0342 
      17  QWindowSystemInterface::sendWindowSystemEvents   qwindowsysteminterface.cpp 698  0x7ffff6793b2c 
      18  userEventSourceDispatch                          qeventdispatcher_glib.cpp  76   0x7ffff7ecb91a 
      19  g_main_context_dispatch                                                          0x7ffff3d45e67 
      20  ??                                                                               0x7ffff3d460d0 
      ... <More>                                                                                          
      

      Attachments

        Issue Links

          For Gerrit Dashboard: QTBUG-56156
          # Subject Branch Project Status CR V

          Activity

            People

              srutledg Shawn Rutledge
              srutledg Shawn Rutledge
              Votes:
              0 Vote for this issue
              Watchers:
              5 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved:

                Gerrit Reviews

                  There are no open Gerrit changes