Qt 5.0.1 with X11 and missing touchPointReleased events using a multitouch touchscreen
-
I'm seeing a quite strange problem with touchPointReleased events using the examples. I have tried the following examples: lineedits, fingerpaint, and draganddrop. All of them exhibit the following behavior.
Drag and drop will drag an item around the screen, but it will never drop it. If you lift your finger and put it down somewhere else then the object you were dragging zooms to where your finger now is.
Fingerpaint will work until you touch one of the menus at the top, then whenever you press in the paint area it will paint one dot and then open/close the menu (even though you are not touching it).
lineedits will allow you to open and close the combo boxes, but at some point a release event will be missed and then that menu will continue to open/close no matter where you press. It seems to happen more frequently when you open a combo box, then close it by pressing outside of that combo box.
I've looked into this quite a bit, and from what I am seeing it looks like the X11 code (in xorg-server dix/getevents.c dix/events.c and Xi/exevents.c sections) is sending a XI_TouchBegin (to start the sequence), and XI_TouchUpdate (if needed), and then XI_TouchEnd (when it works), or XI_RawTouchEnd (when it breaks).
When the XI_RawTouchEnd is sent the Qt application cannot see it because according to xorg-server and the xcb code it is not a root window, and thus raw events are not deliverable. The code in src/plugins/platforms/xcb/qxcbconnection_xi2.cpp (xi2Select function) shows the XISelectEvents call that only listens for XI_TouchBegin, XI_TouchUpdate, and XI_TouchEnd. I have tried changing it to also listen for the raw events (XI_RawTouchBegin, XI_RawTouchUpdate, and XI_RawTouchEnd), but XISelectEvents returns an error because the xcb_window_t struct used in the function call is not a root window.The XI_RawTouchEnd being sent as the last in the sequence causes the code in src/widgets/kernel/qapplication.cpp (translateRawTouchEvent) to not remove that touch point sequence from the touchPoints array. Subsequently any new touch sequence that comes in will in turn update the now dangling touch sequence.
Has anyone else seen this behavior?
All of this seems to go away if I use -plugin EvdevTouch:/dev/input/event1, but when I do that I also lose multitouch (not very appealing at all).My setup:
I'm using an ft5x06 (Focaltech) multitouch enabled touchscreen (it supports up to 5 simultaneous points).
xorg-server 1.12.2 (although I have tried the newest version from GIT with the same results)
xf86-input-evdev-2.7.0
mtdev-1.1.3
libXi-1.6.1
Qt 5.0.1 (with USE_MTDEV)
I am using an ARM board
Linux kernel version: 3.0.35If you need more information please let me know, and I will get back to you as soon as possible.
-
Hello,
glad to hear that I'm not the only one having this problem. Thank you for your detailed explanation of the problem. My setup is:
Qt 5.1.1
xorg-x11-server-7.6_1.14.3.901
xf86-input-evdev-2.8.2
openSUSE 13.1
Kernel 3.10.33-rt32Did you find a solution in the meantime?
Regards,
Florian -
Hello again,
I noticed that the problem is gone in Qt 5.2.1.
Best regards,
Florian