Bug 97595

Summary: Undefined behavior: disabling a mouse while "disabled on external mouse" is set on touchpad
Product: Wayland Reporter: Peter Hutterer <peter.hutterer>
Component: libinputAssignee: Wayland bug list <wayland-bugs>
Status: RESOLVED WORKSFORME QA Contact:
Severity: normal    
Priority: medium CC: carlosg, peter.hutterer
Version: unspecified   
Hardware: Other   
OS: All   
Whiteboard:
i915 platform: i915 features:

Description Peter Hutterer 2016-09-05 00:25:35 UTC
libinput provides a LIBINPUT_CONFIG_SEND_EVENTS_DISABLED_ON_EXTERNAL_MOUSE on touchpads which disable the device whenever an external pointer device is plugged in.

This works as it says on the box but when a touchpad is set to this value and LIBINPUT_CONFIG_SEND_EVENTS_DISABLED is set on the mouse device, then both devices remain disabled. It's not possible for a client to have that flag set on the touchpad and then disabling another device.

For Wayland this means there is no way to disable a pointer-looking device in libinput while simultaneously having the "disabled on external mouse" feature available. In X we can work around it by using the "Device Enabled" property which is outside of libinput.

So the two options we have is:
* declare this as intended but that shifts the handling to the caller who now has to keep track of external devices, making the option effectively moot. because once you have the code for this, why use the built-in one...
* within libinput track which device(s) toggled this feature and re-enable the touchpad when the respective device is disabled. This has a potential to get iffy if we have more external pointer devices but I'm hoping that this is enough of a niche that we can ignore at least that bit.
Comment 1 Peter Hutterer 2016-09-05 00:47:47 UTC
ok, nevermind, we already do number 2 :)

wasn't quite as obvious from the code.

Use of freedesktop.org services, including Bugzilla, is subject to our Code of Conduct. How we collect and use information is described in our Privacy Policy.