mirror of
https://gitlab.freedesktop.org/wlroots/wlroots.git
synced 2026-04-21 06:46:46 -04:00
backend/libinput/backend.c, backend/libinput/tablet_pad.c, backend/libinput/tablet_tool.c, backend/session/session.c: make udev optional
This commit is contained in:
parent
68652158b7
commit
3468395cba
8 changed files with 65 additions and 6 deletions
|
|
@ -3,12 +3,16 @@
|
|||
#include <string.h>
|
||||
#include <libinput.h>
|
||||
#include <stdlib.h>
|
||||
#include <libudev.h>
|
||||
#include <wlr/interfaces/wlr_tablet_pad.h>
|
||||
#include <wlr/util/log.h>
|
||||
#include <wlr/config.h>
|
||||
#include "backend/libinput.h"
|
||||
#include "util/signal.h"
|
||||
|
||||
#if WLR_HAS_UDEV
|
||||
#include <libudev.h>
|
||||
#endif
|
||||
|
||||
const struct wlr_tablet_pad_impl libinput_tablet_pad_impl = {
|
||||
.name = "libinput-tablet-pad",
|
||||
};
|
||||
|
|
@ -107,9 +111,11 @@ void init_device_tablet_pad(struct wlr_libinput_input_device *dev) {
|
|||
wlr_tablet_pad->strip_count =
|
||||
libinput_device_tablet_pad_get_num_strips(handle);
|
||||
|
||||
#if WLR_HAS_UDEV
|
||||
struct udev_device *udev = libinput_device_get_udev_device(handle);
|
||||
char **dst = wl_array_add(&wlr_tablet_pad->paths, sizeof(char *));
|
||||
*dst = strdup(udev_device_get_syspath(udev));
|
||||
#endif
|
||||
|
||||
int groups = libinput_device_tablet_pad_get_num_mode_groups(handle);
|
||||
for (int i = 0; i < groups; ++i) {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue