mirror of
https://gitlab.freedesktop.org/libinput/libinput.git
synced 2026-01-01 18:40:09 +01:00
plugin: don't initialize the debounce plugin on a virtual device
Effectively the same motivation as commit5d23794d53("tablet: disable smoothing for uinput devices") - virtual devices should not need debouncing and if they do let's do the debouncing on the other end that creates those devices. (cherry picked from commit428a3299a8) Part-of: <https://gitlab.freedesktop.org/libinput/libinput/-/merge_requests/1326>
This commit is contained in:
parent
c76e05a0ae
commit
6524edd9de
3 changed files with 13 additions and 0 deletions
|
|
@ -33,6 +33,7 @@
|
|||
#include "libinput-log.h"
|
||||
#include "libinput-plugin-button-debounce.h"
|
||||
#include "libinput-plugin.h"
|
||||
#include "libinput-private.h"
|
||||
#include "libinput-util.h"
|
||||
#include "quirks.h"
|
||||
#include "timer.h"
|
||||
|
|
@ -730,6 +731,9 @@ debounce_plugin_device_added(struct libinput_plugin *libinput_plugin,
|
|||
if (!libinput_device_has_capability(device, LIBINPUT_DEVICE_CAP_POINTER))
|
||||
return;
|
||||
|
||||
if (libinput_device_is_virtual(device))
|
||||
return;
|
||||
|
||||
_unref_(udev_device) *udev_device = libinput_device_get_udev_device(device);
|
||||
if (udev_device) {
|
||||
const char *prop = udev_device_get_property_value(udev_device,
|
||||
|
|
|
|||
|
|
@ -724,6 +724,9 @@ libinput_device_init(struct libinput_device *device, struct libinput_seat *seat)
|
|||
bool
|
||||
libinput_device_has_model_quirk(struct libinput_device *device, enum quirk model_quirk);
|
||||
|
||||
bool
|
||||
libinput_device_is_virtual(struct libinput_device *device);
|
||||
|
||||
struct libinput_device_group *
|
||||
libinput_device_group_create(struct libinput *libinput, const char *identifier);
|
||||
|
||||
|
|
|
|||
|
|
@ -2244,6 +2244,12 @@ libinput_device_has_model_quirk(struct libinput_device *device, enum quirk model
|
|||
return result;
|
||||
}
|
||||
|
||||
bool
|
||||
libinput_device_is_virtual(struct libinput_device *device)
|
||||
{
|
||||
return evdev_device_is_virtual((struct evdev_device *)device);
|
||||
}
|
||||
|
||||
static uint32_t
|
||||
update_seat_key_count(struct libinput_seat *seat,
|
||||
keycode_t keycode,
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue