On Fri, 9 Mar 2012, [email protected] wrote: > Hi Jon, > > Yes, good catch, the built-in timestamping of QWindowSystemInterface is > broken due to the lack of a call to start() or restart(). This affects mouse > and touch events generated by plugins that do not provide their own > timestamps. > > The patch looks good although we may want to consider switching to > QElapsedTimer. But that's something for another patch. >
Yes, I thought QElapsedTimer was a better fit, but it deals in qint64's rather than the ulongs QTime deals with, so I left it alone as I was worried about possible API issues. I'm willing to work on a patch moving to QElapsedTimer if you think it's safe to do at this stage. Thanks for taking a look at it. On a perhaps unrelated note: Is there a list of people that should be added as reviewers to these merge requests for specific subsystems? I didn't add any initially as I didn't know who I should add. --- > Regards, > Laszlo > > -----Original Message----- > From: [email protected] > [mailto:[email protected]] On > Behalf Of ext Jon Trulson > Sent: 09 March 2012 01:19 > To: [email protected] > Subject: [Development] Question regarding recent commit 'Fix double click > handling.' > > regarding commit id: b371f3f943703840d0dfbe30505018bcca06e260 > > I guess this question is for you Laszlo. > > About a week or so ago, I discovered a problem with mouse handling (arm > board, eglfs, using evdevmouse plugin). > > I found that every other mouse press event (with no intervening > movement) would get lost. > > Digging deeper, I found that the event timer > (QWindowSystemInterfacePrivate::eventTime) in qwindowsysteminterface_qpa.cpp > is never actually .start()'ed. This results in all eventTime.elapsed() calls > returning 0, and therefore any comparisons against the event's timestamp in > other places (like the doubleclick logic) to be meaningless (since they are > all always 0). > > I submitted a change request: http://codereview.qt-project.org/18482 > that did fix the missing button event problem, by ensuring that the timer is > actually started. I didn't know who to ask to review, but maybe you are the > one? > > At any rate, with your fixes (the above mentioned commit) and my fix removed > as a test, I no longer miss mouse button events. However, every other click > now generates a doubleclick event, which is wrong. > > Re-adding my fix seems to work correctly - I only get doubleclicks events > when I actually doubleclick. > > So - while my fix may not be the best place to start the timer, it is still > needed in some fashion - the timer has to be started somewhere for this logic > to ever work properly... > > Can this change request get reviewed or laughed at? > > Thanks. > > -- > Jon Trulson > > "Get the cheese to sickbay, the Doctor should look at it as soon as > possible." -- Chief Engineer B'Elanna Torres, Voyager > _______________________________________________ > Development mailing list > [email protected] > http://lists.qt-project.org/mailman/listinfo/development > -- Jon Trulson "Get the cheese to sickbay, the Doctor should look at it as soon as possible." -- Chief Engineer B'Elanna Torres, Voyager _______________________________________________ Development mailing list [email protected] http://lists.qt-project.org/mailman/listinfo/development
