[Okular-devel] Using TabletEvent hiRes positions
Oliver Sander
oliver.sander at tu-dresden.de
Thu Jul 14 08:54:29 UTC 2016
Dear okular developers,
I recently noticed the following patch going into the frameworks branch:
commit d700bc626eb893c896d43be3566dbcd13478a937
Author: Martin T. H. Sandsmark <martin.sandsmark at kde.org>
Date: Mon Jul 11 22:13:52 2016 +0200
Port away from obsolete QTabletEvent member
diff --git a/ui/pageviewannotator.cpp b/ui/pageviewannotator.cpp
index dbb46cb..0b4a34a 100644
--- a/ui/pageviewannotator.cpp
+++ b/ui/pageviewannotator.cpp
[snip]
@@ -909,7 +909,7 @@ QRect PageViewAnnotator::routeTabletEvent( QTabletEvent * e, PageViewItem * item
// figure out the event type and button
AnnotatorEngine::decodeEvent( e, &eventType, &button );
- const QPointF globalPosF = e->hiResGlobalPos();
+ const QPointF globalPosF = e->globalPosF();
const QPointF localPosF = globalPosF - localOriginInGlobal;
return performRouteMouseOrTabletEvent( eventType, button, localPosF, item );
}
Note that the patch replaces a hiRes position with a low-res one. Is this change intentional?
Because as I understand it, the hiRes position was used for a reason, see
https://git.reviewboard.kde.org/r/106816/
which originally introduced the code in question.
I can reproduce the differences in quality from the reviewboard entry on my ThinkPad Yoga on the
okular git master. Unfortunately I cannot do the same on the frameworks branch, because my
Qt 5.6 TabletEvent seems to be buggy -- I cannot really draw to begin with.
Thanks for working on okular,
Oliver
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 473 bytes
Desc: OpenPGP digital signature
URL: <http://mail.kde.org/pipermail/okular-devel/attachments/20160714/2d04e181/attachment-0001.sig>
More information about the Okular-devel
mailing list