mirror of
https://gitlab.freedesktop.org/libinput/libinput.git
synced 2026-05-09 05:58:01 +02:00
plugin: don't initialize the debounce plugin on a virtual device
Effectively the same motivation as commit 5d23794d53 ("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.
Part-of: <https://gitlab.freedesktop.org/libinput/libinput/-/merge_requests/1307>
This commit is contained in:
parent
bdb51593fe
commit
428a3299a8
3 changed files with 13 additions and 0 deletions
|
|
@ -34,6 +34,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"
|
||||
|
|
@ -755,6 +756,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,
|
||||
|
|
|
|||
|
|
@ -730,6 +730,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);
|
||||
|
||||
void
|
||||
libinput_device_disable_feature(struct libinput_device *device,
|
||||
enum libinput_feature feature);
|
||||
|
|
|
|||
|
|
@ -2252,6 +2252,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