I just tried something which solves my problem: disabling the touch device for X server.
It can be done quite easily with the
xinput command which I had to install before using it.
xinput can be installed with
apt-get:
Then executing
xinput command lists the X devices. In my case, simply executing the command fails with a
Unable to connect to X server message. The command has to be executed after setting the
DISPLAY environment variable:
Code: Select all
pi@RasPyDashboard:~ $ DISPLAY=:0.0 xinput
⎡ Virtual core pointer id=2 [master pointer (3)]
⎜ ↳ Virtual core XTEST pointer id=4 [slave pointer (2)]
⎜ ↳ SIGMACHIP USB Keyboard id=7 [slave pointer (2)]
⎜ ↳ FT5406 memory based driver id=8 [slave pointer (2)]
⎣ Virtual core keyboard id=3 [master keyboard (2)]
↳ Virtual core XTEST keyboard id=5 [slave keyboard (3)]
↳ SIGMACHIP USB Keyboard id=6 [slave keyboard (3)]
↳ SIGMACHIP USB Keyboard id=9 [slave keyboard (3)]
The pointing device of the official touchscreen is known as
FT5406 memory based driver. So I just executed the
xinput disable command, providing it the device's name, to prevent it from controlling the X pointer:
Code: Select all
DISPLAY=:0.0 xinput disable "FT5406 memory based driver"
Although the touchscreen does not control the mouse pointer anymore, it still is working for my Kivy app running on official touchscreen.
Misson complete...
Note that the setting is not persistent, thus it has to be set at each RasPI start. Setting the command in any file being run at startup should do the trick but if anyone knows a way to make it persistent, I would be happy to know it.