- 13 Sep, 2016 4 commits
-
-
Peter Hutterer authored
Signed-off-by:
Peter Hutterer <peter.hutterer@who-t.net>
-
Peter Hutterer authored
Clear typo. Not bothering to be backwards compatible here, anything that uses the #define will update on rebuild, anyone using the string directly should've told me about the typo... Signed-off-by:
Peter Hutterer <peter.hutterer@who-t.net> Reviewed-by:
Hans de Goede <hdegoede@redhat.com> (cherry picked from commit 2f1df46b)
-
Peter Hutterer authored
Signed-off-by:
Peter Hutterer <peter.hutterer@who-t.net> (cherry picked from commit b508c54f)
-
Peter Hutterer authored
https://bugs.freedesktop.org/show_bug.cgi?id=95295 Signed-off-by:
Peter Hutterer <peter.hutterer@who-t.net> (cherry picked from commit ce85432f)
-
- 28 Apr, 2016 2 commits
-
-
Peter Hutterer authored
Signed-off-by:
Peter Hutterer <peter.hutterer@who-t.net>
-
Peter Hutterer authored
60 sorts higher than the other drivers (evdev has 10, synaptics, wacom and others have 50) so we keep the same order. This is part of a two-step solution, the other half is renaming the xf86-input-wacom's config snippet to sort higher than libinput's. Currently libinput picks up devices that are (for now) destined to the wacom driver. Since the wacom driver is more of a leaf package than libinput, the best option here is to make the wacom driver sort higher and let users uninstall it when not needed. To avoid crowding the 90-* space where users usually have custom config snippets, drop libinput down to 60 and bump wacom up. Signed-off-by:
Peter Hutterer <peter.hutterer@who-t.net> Acked-by:
Jason Gerecke <jason.gerecke@wacom.com>
-
- 08 Apr, 2016 1 commit
-
-
Addition of xf86.h header fixes compilation issues in some cases. See: https://bugs.gentoo.org/show_bug.cgi?id=560970 Signed-off-by:
Stanislav Ochotnicky <sochotnicky@redhat.com> Signed-off-by:
Peter Hutterer <peter.hutterer@who-t.net>
-
- 07 Apr, 2016 1 commit
-
-
Peter Hutterer authored
Signed-off-by:
Peter Hutterer <peter.hutterer@who-t.net>
-
- 29 Feb, 2016 4 commits
-
-
Peter Hutterer authored
The art pen is a normal pen, but it does provide a rotation axis. Signed-off-by:
Peter Hutterer <peter.hutterer@who-t.net>
-
Peter Hutterer authored
Signed-off-by:
Peter Hutterer <peter.hutterer@who-t.net>
-
Peter Hutterer authored
Same axes as the pen, but axis number 6 is the wheel (which really is a slider) Signed-off-by:
Peter Hutterer <peter.hutterer@who-t.net>
-
Peter Hutterer authored
Use two new internal capabilities, CAP_TABLET and CAP_TABLET_TOOL. If a libinput tablet device is added, add an X device without any classes. This device will not send events, but once we have pad support in libinput we may be able to this the pad device. When a tool comes into proximity, create a new X device for that serial number and start sending events through it. Since the X device only represents a single serial number/type combination, some of the wacom-specific configuration options fall away. This only matters in the case of multiple tools, in which case a per-tool configuration is preferable anyway, so we don't lose anything here. Gesture support only applied to the touch parts on the device, we don't deal with this here specifically - that event node is handled by libinput as touchscreen or touchpad. This already works with GIMP and clients that don't rely on any wacom-driver-specific properties. Configuration clients like gnome-settings-daemon will need to change to handle new properties, to be added as we go along. Signed-off-by:
Peter Hutterer <peter.hutterer@who-t.net>
-
- 26 Feb, 2016 1 commit
-
-
Peter Hutterer authored
Signed-off-by:
Peter Hutterer <peter.hutterer@who-t.net>
-
- 28 Jan, 2016 2 commits
-
-
Peter Hutterer authored
Signed-off-by:
Peter Hutterer <peter.hutterer@who-t.net>
-
Peter Hutterer authored
Signed-off-by:
Peter Hutterer <peter.hutterer@who-t.net> Reviewed-by:
Hans de Goede <hdegoede@redhat.com>
-
- 27 Jan, 2016 1 commit
-
-
Peter Hutterer authored
Signed-off-by:
Peter Hutterer <peter.hutterer@who-t.net>
-
- 05 Jan, 2016 2 commits
-
-
Peter Hutterer authored
This splits the hotplugging code up so we can use it through a callback but also as an immediate call that gives us back the device just hotplugged. Also added is the ability to add extra options to the device. Signed-off-by:
Peter Hutterer <peter.hutterer@who-t.net>
-
Peter Hutterer authored
Signed-off-by:
Peter Hutterer <peter.hutterer@who-t.net>
-
- 23 Dec, 2015 1 commit
-
-
Peter Hutterer authored
Signed-off-by:
Peter Hutterer <peter.hutterer@who-t.net>
-
- 17 Dec, 2015 1 commit
-
-
Peter Hutterer authored
Make sure we don't send any events that may have been enqueued before we initialized ourselves. Specifically, if we're using systemd-logind the fd remains open when we disable/enable the device, allowing events to queue up on the fd. These events are then replayed once the device is re-opened. This is not the case when VT-switching, in that case logind closes the fd for us. Signed-off-by:
Peter Hutterer <peter.hutterer@who-t.net> Reviewed-by:
Keith Packard <keithp@keithp.com>
-
- 22 Nov, 2015 1 commit
-
-
Peter Hutterer authored
The server struggles with devices that are both, the protocol (especially XI2) requires a fairly strict separation of pointer vs keyboard devices. Though the server has a couple of hacks to route events correctly, mixed devices still experience bugs like [1]. Instead of advertising the device as a single mixed device, split the device into two X devices, one with only a pointer/touch component, one with only a keyboard component. This ensures that the device is effectively attached to both the VCP and the VCK, something the XI2 protocol doesn't really allow. This patch drops the keyboard capability on a mixed device, duplicates the input options and attributes and queues a NewInputDeviceRequest call. The new device only has the keyboard capability but is otherwise unchanged. The wacom driver has used this approach for years. The WorkProc is necessary to avoid inconsistent state, the server doesn't handle a NewInputDeviceRequest during PreInit well. The approach: During pre-init we create a struct xf86libinput_device with the libinput_device and a unique ID. The child device has that ID added to the options and will look for the other device during its pre-init. The two devices then share the xf86libinput_device struct. We only have a single epollfd for all devices and the server calls read_input on the first device in the list with the epollfd as pInfo->fd. That shared struct is used as the userdata on the libinput_device we get back from the event, and each device is in the xorg_list device_list of that shared struct. We loop through those to find the ones with the right capabilities and post the event through that device. Since devices can be enabled and disabled independently, the rest of the code makes sure that we only ever add the device to libinput when the first shared device is enabled, and remove it accordingly. The server uses pInfo->major/minor to detect if another device is using the same path for a logind-controlled fd. If so, it reuses that device's pInfo->fd and sets the "fd" option to that value. That pInfo->fd is the libinput epollfd though, not the actual device fd. This doesn't matter for us, since we manage the fds largely ourselves and the pInfo->fd we use is the epollfd anyway. On unplug however, the udev code triggers a device removal for all devices, including the duplicated ones. When we disable device, we restore the pInfo->fd from the "fd" option so that the server can request logind to close the fd. That only works if the "fd" option is correct, otherwise the server asks logind to close the epollfd and everyone is unhappy. [1] https://bugs.freedesktop.org/show_bug.cgi?id=49950 https://bugs.freedesktop.org/show_bug.cgi?id=92896 Signed-off-by:
Peter Hutterer <peter.hutterer@who-t.net> Reviewed-by:
Hans de Goede <hdegoede@redhat.com>
-
- 20 Nov, 2015 1 commit
-
-
Peter Hutterer authored
When using logind, this causes the server to hang when a split device is unplugged. The reason is mostly in the server, when open the device by requesting the logind fd, the server loops through the device list to check if any other device has the same major/minor (see systemd_logind_take_fd()) and returns the pInfo->fd for that device instead of requesting the fd again from logind. For libinput devices, the pInfo->fd is the epollfd, not the actual device, so our second device gets the epollfd assigned. When the devices are removed, we keep the device fd open and release the epollfd through logind. This reverts commit c943739a.
-
- 19 Nov, 2015 1 commit
-
-
Peter Hutterer authored
The server struggles with devices that are both, the protocol (especially XI2) requires a fairly strict separation of pointer vs keyboard devices. Though the server has a couple of hacks to route events correctly, mixed devices still experience bugs like [1]. Instead of advertising the device as a single mixed device, split the device into two X devices, one with only a pointer/touch component, one with only a keyboard component. This ensures that the device is effectively attached to both the VCP and the VCK, something the XI2 protocol doesn't really allow. This patch drops the keyboard capability on a mixed device, duplicates the input options and attributes and queues a NewInputDeviceRequest call. The new device only has the keyboard capability but is otherwise unchanged. The wacom driver has used this approach for years. The WorkProc is necessary to avoid inconsistent state, the server doesn't handle a NewInputDeviceRequest during PreInit well. The approach: During pre-init we create a struct xf86libinput_device with the libinput_device and a unique ID. The child device has that ID added to the options and will look for the other device during its pre-init. The two devices then share the xf86libinput_device struct. We only have a single epollfd for all devices and the server calls read_input on the first device in the list with the epollfd as pInfo->fd. That shared struct is used as the userdata on the libinput_device we get back from the event, and each device is in the xorg_list device_list of that shared struct. We loop through those to find the ones with the right capabilities and post the event through that device. Since devices can be enabled and disabled independently, the rest of the code makes sure that we only ever add the device to libinput when the first shared device is enabled, and remove it accordingly. [1] https://bugs.freedesktop.org/show_bug.cgi?id=49950 https://bugs.freedesktop.org/show_bug.cgi?id=92896 Signed-off-by:
Peter Hutterer <peter.hutterer@who-t.net> Reviewed-by:
Hans de Goede <hdegoede@redhat.com>
-
- 17 Nov, 2015 4 commits
-
-
Peter Hutterer authored
Signed-off-by:
Peter Hutterer <peter.hutterer@who-t.net> Reviewed-by:
Hans de Goede <hdegoede@redhat.com>
-
Peter Hutterer authored
And use those copied caps instead of the direct device capability calls. No functional changes at this point, this is preparation work for selectively disabling capabilities on a device. Signed-off-by:
Peter Hutterer <peter.hutterer@who-t.net> Reviewed-by:
Hans de Goede <hdegoede@redhat.com>
-
Peter Hutterer authored
No functional changes Signed-off-by:
Peter Hutterer <peter.hutterer@who-t.net> Reviewed-by:
Hans de Goede <hdegoede@redhat.com>
-
Peter Hutterer authored
A device that fails pre_init has a ref to the libinput context but may not have a pInfo->private. For those devices we never call libinput_unref() and the libinput struct never gets freed. Thus if at least one device didn't pass pre_init, we never cleaned up after ourselves. Signed-off-by:
Peter Hutterer <peter.hutterer@who-t.net> Reviewed-by:
Hans de Goede <hdegoede@redhat.com>
-
- 13 Nov, 2015 3 commits
-
-
Peter Hutterer authored
We're not doing anything here, so no reason to fail. Signed-off-by:
Peter Hutterer <peter.hutterer@who-t.net>
-
Peter Hutterer authored
Obsolete as of 353c52f2 Signed-off-by:
Peter Hutterer <peter.hutterer@who-t.net>
-
Peter Hutterer authored
No real effect in the current code, but it adds a bit of safety. Signed-off-by:
Peter Hutterer <peter.hutterer@who-t.net>
-
- 12 Nov, 2015 1 commit
-
-
Peter Hutterer authored
Signed-off-by:
Peter Hutterer <peter.hutterer@who-t.net>
-
- 27 Oct, 2015 1 commit
-
-
Peter Hutterer authored
Signed-off-by:
Peter Hutterer <peter.hutterer@who-t.net>
-
- 26 Oct, 2015 1 commit
-
-
Peter Hutterer authored
Signed-off-by:
Peter Hutterer <peter.hutterer@who-t.net>
-
- 17 Sep, 2015 3 commits
-
-
Peter Hutterer authored
Signed-off-by:
Peter Hutterer <peter.hutterer@who-t.net>
-
Peter Hutterer authored
If we install the config file by default, we shouldn't use libinput for devices we know we can't handle. Signed-off-by:
Peter Hutterer <peter.hutterer@who-t.net>
-
Peter Hutterer authored
This way it still sorts after the usual subjects, but it's easier to stack extra config in afterwards. Signed-off-by:
Peter Hutterer <peter.hutterer@who-t.net>
-
- 03 Sep, 2015 2 commits
-
-
Peter Hutterer authored
Takes a void*, not a void** Signed-off-by:
Peter Hutterer <peter.hutterer@who-t.net>
-
Peter Hutterer authored
Signed-off-by:
Peter Hutterer <peter.hutterer@who-t.net>
-
- 31 Aug, 2015 2 commits
-
-
Peter Hutterer authored
Signed-off-by:
Peter Hutterer <peter.hutterer@who-t.net>
-
Yomi authored
Correct typo. Draging to dragging.
-