Merge branch 'optional_udev' into 'master'

[RFC] backend/session, backend/libinput: make udev optional

Closes #2257

See merge request wlroots/wlroots!3490
This commit is contained in:
illiliti 2022-05-28 17:24:48 +00:00
commit 50a5efbdc0
15 changed files with 627 additions and 258 deletions

View file

@ -0,0 +1,16 @@
#include <stdbool.h>
#include <sys/types.h>
#include <wlr/backend/session.h>
#include <wayland-server-core.h>
#ifndef BACKEND_SESSION_DEV_H
#define BACKEND_SESSION_DEV_H
int dev_init(struct wlr_session *session, struct wl_display *display);
void dev_finish(struct wlr_session *session);
ssize_t dev_find_gpus(struct wlr_session *session, size_t ret_len,
struct wlr_device **ret);
bool is_drm_card(const char *devname);
#endif

View file

@ -0,0 +1,11 @@
#include <wayland-server-core.h>
#ifndef BACKEND_SESSION_DEV_DEMI_H
#define BACKEND_SESSION_DEV_DEMI_H
struct dev {
int fd;
struct wl_event_source *event;
};
#endif

View file

@ -0,0 +1,13 @@
#include <libudev.h>
#include <wayland-server-core.h>
#ifndef BACKEND_SESSION_DEV_UDEV_H
#define BACKEND_SESSION_DEV_UDEV_H
struct dev {
struct udev *udev;
struct udev_monitor *mon;
struct wl_event_source *udev_event;
};
#endif