Virtual Touch Events for XTEST

Antoine Martin antoine at nagafix.co.uk
Thu Feb 23 07:16:40 UTC 2017


On 23/02/17 09:59, Peter Hutterer wrote:
> On Wed, Feb 22, 2017 at 12:25:07PM +0530, Prakash P wrote:
>> ​​
>> Hi,
>>
>> I want to create an virtual test environment for my web application. I got
>> it working with the help of xvfb and running google-chrome inside it. I am
>> able to send keytrokes and mouse events through the xdotool
>> http://www.semicomplete.com/projects/xdotool which internally uses XTEST.
>>
>> I do have some test cases where I have to send touch events to the chrome
>> browser. Unfortunately the xdotool does not support sending touch events. I
>> am unable to find any info about whether XTEST supports touch events or not..
> 
> it doesn't support touch events, so going down that route isn't possible.
> 
>> I tried creating a "virtual touch device" using user mode input subsystem
>> "uinput" which works only on the logged in x-org session. I am able to send
>> touch events [Code attached in the bottom].
>>
>> But the Xvfb dont care about the virtual uinput devices the "xinput list"
>> revealed only the following.
>>
>>> sudo DISPLAY=localhost:2.0 xinput list
> 
> xvfb only initializes dummy input devices that don't do anything.
> 
>> *⎡ Virtual core pointer                          id=2    [master pointer
>> (3)]⎜   ↳ Virtual core XTEST pointer                id=4    [slave
>> pointer  (2)]⎜   ↳ Xvfb mouse                                id=6
>> [slave  pointer  (2)]⎣ Virtual core keyboard
>> id=3    [master keyboard (2)]    ↳ Virtual core XTEST
>> keyboard               id=5    [slave  keyboard (3)]    ↳ Xvfb
>> keyboard                             id=7    [slave  keyboard (3)]*
>>
>>
>> I also tried the virtual uinput device with "Xorg X11 dummy video driver"
>> https://xpra.org/trac/wiki/Xdummy which is also not detecting the my
>> "virtual touch device" ( I ran the xorg as non root).
>>
>>
>> I am struck. I don't know where to proceed further.
>> Is there any other options available? Do I have to implement something else?
> 
> The only option I can see is to run a full Xorg with the uinput touch
> device. Short of that, I don't think anything will help.
Xdummy is a "full Xorg" just running with the dummy video driver.

This question is very similar to the one I asked last year, also using
Xdummy:
https://lists.freedesktop.org/archives/xorg/2016-June/058138.html
"emit smooth scrolling/pixel perfect events"

Unfortunately, I didn't understand enough about libinput to make any
progress on this.

I did try a few things but since the plumbing between uinput and the
userspace application handling the events didn't give me any diagnostics
I could understand, I couldn't really tell if the changes I was making
were going in the right direction or not.
Any more noob friendly pointers would be much appreciated.

Cheers
Antoine


> 
> Cheers,
>    Peter
> 
>>
>> Any help would be greatly appreciated.
>>
>> Thanks,
>> Prakash
>>
>>
>> Notes,
>> 1. Starting X virtual frame buffer -  "Xvfb :2 -screen 0 1600x900x24"
>> 2. virtual touch device uinput code -
>> https://drive.google.com/open?id=0B2lQr8WlvKmzZjhJOHB0b0x4ZGc   (with the
>> help of  http://thiemonge.org/getting-started-with-uinput )
>> 3. For the xvfb - I used CentOS 7.3 with Xorg -  1.17.2, pixman 0.34.0,
>> kernel -3.10.0
>> 4. For the x dummy driver - I used ubuntu 16.10 with Xorg 1.18.4, pixman -
>> 0.33.6 , kernel -4.10.
>>
>>
>> -- 
>> Anyone who has never made a mistake has never tried anything new.
> 
> _______________________________________________
> xorg-devel at lists.x.org: X.Org development
> Archives: http://lists.x.org/archives/xorg-devel
> Info: https://lists.x.org/mailman/listinfo/xorg-devel
> 



More information about the xorg-devel mailing list