Set Qt::AA_CompressTabletEvents attribute to avoid latency when scrolling with a tablet
ClosedPublic

Authored by kezik on Oct 29 2018, 8:11 PM.

Details

Summary

BUG: 399208

See also: https://bugreports.qt.io/browse/QTBUG-71708

Enabling this option _vastly_ improves the user experience on wacom tablets and touchscreens

Diff Detail

Repository
R223 Okular
Lint
Automatic diff as part of commit; lint not applicable.
Unit
Automatic diff as part of commit; unit tests not applicable.
kezik created this revision.Oct 29 2018, 8:11 PM
Restricted Application added a subscriber: okular-devel. · View Herald TranscriptOct 29 2018, 8:11 PM
kezik requested review of this revision.Oct 29 2018, 8:11 PM
kezik updated this revision to Diff 44486.Oct 30 2018, 12:26 PM

Waste less cpu cycles

aacid added a subscriber: aacid.Nov 7 2018, 9:53 PM

Using timers doesn't seem like a good idea to me.

How much events do you get? What's the delta of each event?

kezik updated this revision to Diff 54655.Mar 24 2019, 11:32 AM
kezik retitled this revision from Don't call scrollTo every time there's a mouseMoveEvent, use a timer instead to Set Qt::AA_CompressTabletEvents attribute to avoid latency when scrolling with a tablet.
kezik edited the summary of this revision. (Show Details)

This is the correct fix for this issue, disregard the past patch

sander added a subscriber: sander.Mar 24 2019, 4:03 PM

I tried this on my ThinkPad Yoga 12, which comes with a stylus to write on the screen with. I confirm that this patch noticeably improves the scrolling behavior when using the stylus for scrolling.

I am curious though: what are the downsides to enabling tablet event compression? When would I want to disable it?

kezik added a comment.Mar 24 2019, 4:13 PM

Hi, thanks for the feedback.

I think uncompressed tablet events are useful for example on krita, when you don't want to lose the "high frequency" content of the drawing on the screen, and latency is not a big issue.
I don't see any downsides for okular, mouse events are already compressed, this patch only fixes a Qt "documented quirk"

I do use my stylus for drawing on slides in presentation mode. I am not particularly happy with the quality of that, but compressing tablet events doesn't seem to make it worse. So no objections from my side.

ngraham accepted this revision.Apr 5 2019, 3:48 PM
ngraham added a subscriber: ngraham.

Works better for me too on my HP Spectre x360, and I couldn't find any regressions in behavior.

@kezik can you provide your full name and email address so we can land this patch with correct authorship information? Thanks!

This revision is now accepted and ready to land.Apr 5 2019, 3:48 PM
kezik added a comment.Apr 5 2019, 4:29 PM

Works better for me too on my HP Spectre x360, and I couldn't find any regressions in behavior.

@kezik can you provide your full name and email address so we can land this patch with correct authorship information? Thanks!

Thanks

I don't want to disclose my full name, email is keziolio123@gmail.com and you can put "kezi" as the name

This revision was automatically updated to reflect the committed changes.

I had to do "Kezi Olio" to pass the commit filters which demand a two-part name, hope you don't mind.

kezik added a comment.Apr 5 2019, 4:39 PM

I had to do "Kezi Olio" to pass the commit filters which demand a two-part name, hope you don't mind.

Perfect
Thanks

aacid added a comment.Apr 6 2019, 11:01 AM

Please never ever again land commits of anonymous people. If somewhen we want to relicense we're fucked.

kezik added a comment.Apr 6 2019, 11:04 AM

Oh come on
I release all my commits as CC0, do what you want, just fix it

Please never ever again land commits of anonymous people. If somewhen we want to relicense we're fucked.

We've had this conversation before and I recall the conclusion being that as long as we have a real and legitimate email address, things are good. We're currently actively accepting commits from "Nerdopolis Turfwalker" to KWin and "Loh Tar" to Kate and KTextEditor, both of whom use pseudonyms with real email addresses. Each time eyebrows were raised but the conclusion was that real names are optional but email addresses must be real. If you disagree with this, then probably it's time for another mailing list thread.

@kezik if you wish to record your relicensing preferences, please submit a patch to add yourself and your preferences to https://cgit.kde.org/kde-dev-scripts.git/tree/relicensecheck.pl

aacid added a comment.Apr 7 2019, 4:01 PM

That's your (plural) conclusion not mine, i disagree with that conclusion so i will voice my concern each time that happens.

Ok, well seeing as @kezik is continuing to submit patches (see D20437), I guess your options are to:

  1. Try to convince him/her to provide a real name and re-open the discussion on a mailing list or phab task
  2. Gracefully accept a conclusion you don't agree with
  3. Throw away the contributions
aacid added a comment.Apr 10 2019, 9:28 PM

Ok, well seeing as @kezik is continuing to submit patches (see D20437), I guess your options are to:

  1. re-open the discussion on a mailing list or phab task

I don't know what makes you think *I* should be the one re-open the discussion on a mailing list or phab task, AFAIR *you* are the first person ever to commit hard to trace commits to Okular repo, so it's on *you* to show why we have to agree to such tainting.

Ok, well seeing as @kezik is continuing to submit patches (see D20437), I guess your options are to:

  1. re-open the discussion on a mailing list or phab task

I don't know what makes you think *I* should be the one re-open the discussion on a mailing list or phab task, AFAIR *you* are the first person ever to commit hard to trace commits to Okular repo, so it's on *you* to show why we have to agree to such tainting.

OK, I have done so: https://mail.kde.org/pipermail/kde-community/2019q2/005296.html