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

Double tap on touch screen not provoking mouseDoubleClickEvent - patch included

    XMLWordPrintable

Details

    • Linux/X11, Linux/Yocto
    • 2a0b907f1 (dev), b1481a166 (6.8), 3dbfe75b4 (6.7), 4eeb4c3bf (tqtc/lts-6.5)

    Description

      Our project ugpraded from 5.14.2 to Qt 6.6.1 (on Yocto 4.0.15 Kirkstone, x86), and we found that the mouseDoubleClickEvent inside widgets was no longer being called.

      Patch attached to this JIRA.  Would be great if it was merged into the main branch for releases.

      Comment in our patch MR as follows:

      This issue is caused by an underlying qt issue whereby the event first/previous event position isn't getting persisted between taps. It's only a problem for synthesised events (i.e. touch events that are auto-translated into mouse events) which is why the mouse works and the touch panel does not. For synthesised events, the interactions with processTouchEvent mean that should be persisted in persistentEPD (devPriv->pointById()) is not actually persisted.

      There is a second issue in the same area - not only is the position not correctly persisted, but the event time isn't either (so the second tap could be minutes later and would still be treated as a double tap) - there was an outstanding qt bug for this second issue (https://bugreports.qt.io/browse/QTBUG-100688) that qt have "bodged" to make it work. Their solution is ugly as it involves adding static variables into that function; I don't think this is the right way to fix it, however, this code is so complex and there are so many different scenarios to cater for that it's not trivial to fix without breaking something else. I expect qt will rework this in due course.

      As such, I've taken the same approach for the position issue - we persist the last known position via a static variable. This fixes the double tap so that it now works as you'd expect.

      The offending qt code (that this patch is fixing) can be found here: https://github.com/qt/qtbase/blob/6.6.1/src/gui/kernel/qguiapplication.cpp#L2249

      Attachments

        Issue Links

          No reviews matched the request. Check your Options in the drop-down menu of this sections header.

          Activity

            People

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

              Dates

                Created:
                Updated:
                Resolved:

                Gerrit Reviews

                  There are no open Gerrit changes