Thursday, August 24, 2017

How to check if your touch screen is really sending touch events

I've had this problem twice in the last year, I'm testing something related to touch in my laptop and I'm stuck trying to figure out if it's my code that is wrong or if my screen is misconfigured and it's only sending mouse events.

Thanks to Shawn of Qt fame for having helped me the two times and explained me how to test if my screen is sending touch events, I'm writing this blog so i don't forget and ask him a third time :D

First step is figuring out the xinput id of the touch screen of my laptop

tsdgeos@yoga:~:$ xinput list
⎡ Virtual core pointer id=2 [master pointer (3)]
⎜ ↳ Virtual core XTEST pointer id=4 [slave pointer (2)]
⎜ ↳ Wacom Co.,Ltd. Pen and multitouch sensor Finger id=9 [slave pointer (2)]
⎜ ↳ ETPS/2 Elantech TrackPoint id=13 [slave pointer (2)]
⎜ ↳ ETPS/2 Elantech Touchpad id=14 [slave pointer (2)]
⎣ Virtual core keyboard id=3 [master keyboard (2)]
↳ Virtual core XTEST keyboard id=5 [slave keyboard (3)]
↳ Power Button id=6 [slave keyboard (3)]
↳ Sleep Button id=8 [slave keyboard (3)]
↳ Wacom Co.,Ltd. Pen and multitouch sensor Pen id=10 [slave keyboard (3)]
↳ Integrated Camera id=11 [slave keyboard (3)]
↳ AT Translated Set 2 keyboard id=12 [slave keyboard (3)]
↳ ThinkPad Extra Buttons id=15 [slave keyboard (3)]
↳ Video Bus id=7 [slave keyboard (3)]

In this case would be id=9

Then you can do

tsdgeos@yoga:~:$ xinput test-xi2 9

and if the output contains RawTouchBegin and RawTouchEnd events, it means that the screen is correctly sending touch events :)

Next you probably want to check if Qt actually is seeing those events, for that there's a few ready to use demos in the qtdeclarative source code, so I would do

tsdgeos@yoga:~:$ qml qt5/qtdeclarative_58/examples/quick/touchinteraction/multipointtouch/multiflame.qml

And after putting my five fingers on the screen I would see

So all is good, the bug is my code and not in Qt or the configuration of my touch screen :D

Tuesday, August 01, 2017

Big day in poppler-land

Today in Poppler:
* Poppler 0.57 got released
* We agreed to stop supporting openjpeg 1.x at the end of the year
* We agreed to stop supporting Qt 4.x at the end of the year
* We merged the better_object branch

The last one is the one that is really big, since it introduces a big rework of the Object class, a central component to Poppler. Object is much used like a QVariant, i.e. it can hold various kind of data inside and you can pass it around.

Unfortunately the Object implementation we inherited from xpdf was kind of hard to use, having to basically do the memory management by hand. i.e. destroying the object was not enough to free the memory, you had to call free() on it.

Thanks to C++11 now we have an implementation with move semantics that greatly simplifies the use of Object and will hopefully make for less memory management mistakes.

Let's hope we didn't break anything in the process though :D

Thursday, June 15, 2017

Thursday, April 20, 2017

Okular 1.1 released!

Today KDE Applications 17.04 was released.

It includes Okular 1.1, it contains a nice set of features:
* Add annotation resize functionality
* Add support for auto-calculation of form contents via JavaScript
* Allow to rotate the page view using two-finger pinches on a touchscreen
* Change pages in presentation mode by swiping on touch screen
* Added support for Links that change the Optional Content visibility status
* Allow to disable automatic search while typing
* Allow to create bookmarks from the Table Of Contents

This release was brought to you by Albert Astals Cid, Oliver Sander, Luigi Toscano, Martin T. H. Sandsmark, Tobias Deiminger, Antonio Rojas, Burkhard Lück, Christoph Feck, Elvis Angelaccio, Gilbert Assaf, Heiko Becker, Hrvoje Senjan, Marco Scarpetta, Miklós Máté, Pino Toscano, Yuri Chornoivan.

Tuesday, April 04, 2017

Akademy 2017 Call for Papers deadline is in a week!

The Akademy 2017 Call for Papers ends April 10th at 23:59:59 CEST.

Surely you have interesting stuff to share with the community, so go to https://akademy.kde.org/2017/cfp and submit a proposal!

Tuesday, March 07, 2017

Okular table selection mode is amazing

I case you didn't know ;)


Okular has a amazing table select mode where you select an area and Okular will auto detect rows and columns on it (you can fine-tune it afterwards) and then you can directly copy&paste to a spreadsheet :)

It's mostly tested on PDF files, but should work the same on any of the formats we support text extraction.

Update: This feature is not new, just i got to use it today ;) Video at https://www.youtube.com/watch?v=E8XWI06tltY

Wednesday, March 01, 2017

Okular Form Field auto-updating (Work In Progress)

You can see it in https://www.youtube.com/watch?v=fCLFkpaW3Ug

As the description of the YouTube video says:

Form 14 updates from Form 13 values as defined by the PDF file.
There's a few bugs left:
* To make the page contents update i need to edit another form in the page of the form that is being auto updated
* The contents of the "editable" Form are not updated. (The form is actually not editable since it's readonly)

And also a pile of uncommited and unreviewed patches, and probably only works for very simple files like this one, but it's a start :)


Update: It works fine now and everything has been commited :) https://www.youtube.com/watch?v=S-zmHc3WUhs