raw module grabbing event from xorg

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On 2018-09-05 01:17, Tuomo Rinne wrote:
> Hi, 
> 
> It seems like Xorg does some mapping from the device coordinates to
> screen coordinates. The current methods of tslib reads the events before
> they ever reach any of the Xorg layers.
> 
> If i'm interested in screen/window space coordinates, would it be possible
> and would it make any sense to create a raw module that reads events from
> the Xorg server so it's potentially already mapped to the screen, thus
> reducing the need for configuration?
> 
> Correct me if I'm wrong but as far as I understand the xf86-input-tslib is
> also too low down the stack.

xf86-input-tslib makes tslib's resulting input events available to Xorg.

But it's equally possible to use (the more stable) xf86-input-evdev
together with tslib's ts_uinput (daemon) program. It creates an evdev
/dev/input/eventX device that xf86-input-evdev can use.

You need one of those 2 as soon as you want to use tslib.

> 
> Would I be better off reading events from the Xorg directly without any
> help from tslib?
> 

First, I'd have a look if xf86-input-libinput (or libinput directly)
offer a solution to your problem already.

If you need (tslib's) filters applied to your input event values, I'd
try to use "module_raw input".

In case you don't want to use tslib's calibration and really want X11's
x/y values and need different filters, you'd have to write a new
module_raw against X11. It'd quite easy to do (I'd help you if you post
an initial version), and yes, would make tslib's configuration quite simple.

I guess it depends on whether you need specific filters that we offer in
tslib. Hacking filters into xf86-input-evdev (or xf86-input-libinput)
seems more problematic than writing a simple "module_raw input-x" for
example.

remember, ts_uinput (or xf86-input-tslib) is needed too, to deliver
tslib's values back to X11.

does this help?

                                   martin




[Index of Archives]     [AMD Graphics]     [Linux USB Devel]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]

  Powered by Linux