bendahl / uinput

Go wrapper for uinput on LINUX
MIT License
94 stars 30 forks source link

Compatibility with Wayland/new systems #36

Open bendahl opened 1 year ago

bendahl commented 1 year ago

It appears that on some more recent systems the uinput initialization does not work as expected (see #34). This was pointed out by @gslandtreter. The issue appeared on a system using Wayland. However, it should also be investigated whether the kernel version is a factor here. Once the root cause is confirmed this should be fixed in a backward-compatible manner, if possible without breaking the existing API.

gslandtreter commented 1 year ago

Hi @bendahl, thanks for pointing it out. Indeed I submitted the PR and it worked fine on wayland, but I didn't check if/when the ioctl API changed or whether the change was not backwards compatible with older kernels.

I can help you with this one. The ideal solution would be to check the ioctl API / kernel version and make the calls accordingly. Agreed?

bendahl commented 1 year ago

Sounds good! I think that performing an internal version check is definitely the way to go. Thanks for offering your help on this one, by the way. This is much appreciated!