! Please note that this is a snapshot of our old Bugzilla server, which is read only since May 29, 2020. Please go to gitlab.xfce.org for our new server !
make changes for libinput driver
Status:
RESOLVED: FIXED
Product:
Xfce4-settings
Component:
Mouse Settings

Comments

Description Kevin Fenzi 2015-01-19 23:19:58 CET
Fedora is moving to the libinput driver from evdev/synaptics.

It would be good to adjust mouse settings to handle this change. 

From upstream libinput maintainer: 

> some things will need changing:
> * right handed and reverse scrolling will keep working as-is but can
> be pushed to libinput at a later point
> * Threshold/Acceleration won't work with libinput, needs changing,
> see below
> * Mode won't work (though other than wacom tablets most devices don't 
> support this anyway, so nothing should realistically change here)/
> * Anything in /Properties will stop working when the driver changes, 
> this is the same as an xorg.conf option that's specific to the
> driver. Doesn't need xfce changes though.
> * The "Synaptics Off" property won't work but it doesn't matter. 
> syndaemon isn't needed on libinput, it's smart enough to disable the 
> touchpad on-demand. You could leave all this in and ignore the
> complaint by syndaemon that there' no touchpad.
> 
> So the only thing that needs changing is the pointer acceleration.
> That used to be two separate factors accel/threshold, libinput
> exposes it as one float from -1 to 1, 0 being neutral. Pseudo-code
> for handling this is as follows:
> 
> for device in devices:
>     atom = XInternAtom("libinput Accel Speed");
>     if (XGetDeviceProperty(device, atom))
>       XChangeDeviceProperty(device, atom, value);
> 
> if the property isn't set on the device, you can just ignore that 
> device. xfce_pointers_helper_change_properties is the helper
> functions you guys have here, so it's pretty much just a different
> invocation of the #ifdef DEVICE_PROPERTIES bit in line 879.
> 
> The trick is how you map the accel/threshold into a -1, 1 range. I
> don't know of any standard way to do this, sorry (which btw was the
> reason libinput only exports one toggle now ;)
> 
> Hope that's enough to get you started, the patch itself should be 
> relatively minor. As for side-effects: if a property doesn't exist on
> a device simply continue. So it's safe to check for the property,
> even if you accidentally create it the other drivers ignore the
> properties so you can't really screw up here.
Comment 1 Olivier Fourdan editbugs 2015-01-20 09:26:56 CET
Taking this one as this is already on my TODO list.
Comment 2 Olivier Fourdan editbugs 2015-02-04 22:56:54 CET
Fixed with commit 49be65f

Bug #11469

Reported by:
Kevin Fenzi
Reported on: 2015-01-19
Last modified on: 2015-02-04

People

Assignee:
Olivier Fourdan
CC List:
3 users

Version

Version:
4.11.0

Attachments

Additional information