Input driver on 1.15.1 vs. 1.19.6
Software Orchestration
softorchestra at yahoo.com
Fri Oct 11 10:29:05 UTC 2019
On Thursday, October 10, 2019, 9:35:47 PM PDT, Peter Hutterer <peter.hutterer at who-t.net> wrote: > I'd argue that any input driver that worked in the past should still work
> with current X servers, provided that you switch the SIGIO bits over to
> handle input threads instead.
>
> There are very few features that have truly been removed from input drivers> such as access to the screen dimensions etc. Can't remember when this happen
> but my gut feeling is that if it worked on 1.15 it'll probably work on
> 1.19.
Peter,
Yes, I kind of was thinking that last night, or at least that this should actually work. AlanC pointed out that those functions haven't changed much. One thing I had to do in order to compile the code on Ubuntu 18.04 was add an include for <bits/types/sigset_t.h> as it was giving me a redefinition in one of the libraries called from xf86Xinput.h. If you could elaborate a tad I would appreciate it.
In regard to what you mention with switching over to an input thread, will that let me register a callback that Xorg will send back for all the input events? And then I could just r/w the serial through the xf86 calls?
Also, the old style with the SIGIO, it exported the init routine. I haven't dug into the code too much, other than getting it to compile. The old driver was 32-bit, and 32-bit is not supported on Ubuntu 18.04 moving forward. Old X, 32-bit, old hardware, etc...this is not a glamorous project.
This weekend I'm going to try and decide, use what is there, or just write a new input module. This one is pretty ugly and there's a lot of #ifdefs for old versions. I am still not clear when Xorg 4.x switched over, possibly 2005 or so? Are these defines for XFREE86_V3 and XFREE86_V4 older than Xorg 4? Was that the old XFree86?
I looked through those input drivers that AlanC pointed to and the synaptics uses the xf86ReadSerial() and xf86WriteSerial(). I just need a simple module that will stuff the touch to the mouse.
I'm ok with re-writing, and my client is ok with that also (as long as it doesn't take too long), but I need to decide pretty quickly if that is the best way to approach this.
The previous driver was morphed from the wacom driver. I would guess because it was as close to the serial driver they needed. So the code is ugly and creating a new input module could be worth it. Especially if this will take the client to 1.20, or if it will continue working for the client on Ubuntu 20.04. Although that is not a requirement for me, that would give them another 5 years from next April for 20.04 to end support.
I'll look through those input drivers AlanC pointed to and see if I see an example using input threads.
Thanks for your reply.
Alan (and sorry this stupid yahoo mail sent HTML to the list, I changed that, I hope)
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://lists.x.org/archives/xorg/attachments/20191011/819d7ff0/attachment.html>
More information about the xorg
mailing list