Details
-
Bug
-
Resolution: Done
-
P1: Critical
-
5.0.1, 5.1.0 Beta 1, 5.5.0 Alpha
-
None
-
Linux 3.0.35 (compiled for ARM).
* Xorg-server 1.12.2
* xf86-input-evdev-2.7.0
* mtdev-1.1.3
* ft5×06 (Focaltech) multitouch enabled touchscreen (it supports up to 5 simultaneous points).
* libXi-1.6.1
* libxcb-1.8.1
* Qt 5.0.1 using the xcb plugin in qtbase/src/plugins/platforms/xcb
Configure options for Qt:
-debug -opensource -confirm-license -shared -no-largefile -qt-sql-sqlite -no-audio-backend -javascript-jit -xplatform linux-unknown-g++ -DQT_NO_QWS_CURSOR -DQT_QWS_CLIENTBLIT -DQT_QLOCALE_USES_FCVT -system-zlib -qt-libpng -qt-libjpeg -nomake tools -nomake tests -v -optimized-qmake -no-nis -no-cups -no-iconv -no-pch -dbus -force-pkg-config -opengl es2 -qpa xcb -no-glib -no-gtkstyle -reduce-relocationsLinux 3.0.35 (compiled for ARM). * Xorg-server 1.12.2 * xf86-input-evdev-2.7.0 * mtdev-1.1.3 * ft5×06 (Focaltech) multitouch enabled touchscreen (it supports up to 5 simultaneous points). * libXi-1.6.1 * libxcb-1.8.1 * Qt 5.0.1 using the xcb plugin in qtbase/src/plugins/platforms/xcb Configure options for Qt: -debug -opensource -confirm-license -shared -no-largefile -qt-sql-sqlite -no-audio-backend -javascript-jit -xplatform linux-unknown-g++ -DQT_NO_QWS_CURSOR -DQT_QWS_CLIENTBLIT -DQT_QLOCALE_USES_FCVT -system-zlib -qt-libpng -qt-libjpeg -nomake tools -nomake tests -v -optimized-qmake -no-nis -no-cups -no-iconv -no-pch -dbus -force-pkg-config -opengl es2 -qpa xcb -no-glib -no-gtkstyle -reduce-relocations
-
53d289ec4c0f512a3475da4bbf1f940cd6838ace
Description
Using the fingerpaint example:
- Drag your finger in the paint area (you should see a strip of paint).
- Open any of the drop down menus at the top left of the screen (the one pressed should open)
- Try to drag your finger in the paint area (I only see a dot where it started then I see the menu, that was open, close.)
Using the lineedits example:
- Open any lineedit (it should open)
- Press somewhere else in the window (the lineedit should close)
- Open another line edit
- Repeat steps 1 through 3, at some point a line edit will start opening or closing even though you had not pressed it.
Using the fridgemagnets example:
- Drag any item anywhere.
- Lift your finger
- Put your finger down somewhere else from where you lifted, and you will see the magnet "fly" to where your finger is. You can never grab any other magnet, you can only move the first one you grabbed.
What seems to be happening (as far as I can figure), is that code in qwidget.cpp and qwidget_qpa.cpp is calling setMouseGrabEnabled and setKeyboardGrabEnabled to try and steal focus from the popup that should go away and give it to the popup that is to open.
That is not what happens though. X is getting the message to give up the keyboard/mouse and is thus setting that clients xi2mask to 0x0 (since a window that does not have focus shouldn't be listening to events), and then X gets the message to give focus to another "window" (in reality they are the same window). The problem lies in the fact that during that period of nebulous focus an XI_TouchEnd (or XI_TouchUpdate or XI_TouchBegin) can happen and Qt will miss it. When Qt misses the XI_TouchEnd, then the code in qtbase/src/plugins/platforms/xcb/qxcbconnection_xi2.cpp (xi2HandleEvent) doesn't know to remove that id from the m_touchPoints QList, and as a result every subsequent update in that function (basically anytime an XI2 event happens) will see the for loop send that (now stale) touch along as if it is still active.
I don't fully understand this, but it seems that Qt shouldn't be giving up focus to give it right back when they are both (according to xcb anyway) the same window.
Small side note, the plugin EvdevTouch (which would seem the natural way to do this) does not support rotation, and I need rotation.
If you need even more detail just let me know. (e.g. configure options passed to the X applications, other X components I am using).
Attachments
Issue Links
- is required for
-
QTBUG-45079 xcb: XI2: menus and combobox popups work badly on touchscreens
- Reported
- relates to
-
QTBUG-35157 Duplicate emulated mouse events on XInput2
- Closed
-
QTBUG-45054 Missing QTouchEnd event when QMenu popup shown
- Closed
-
QTBUG-38625 XI2 Touch-events does not always end up moving the mouse cursor.
- Closed