mirror of
https://gitlab.freedesktop.org/wlroots/wlroots.git
synced 2026-06-14 14:32:57 -04:00
backend/libinput: create udev context directly
This commit is contained in:
parent
a6e5b2f15b
commit
78506465bc
1 changed files with 2 additions and 1 deletions
|
|
@ -7,6 +7,7 @@
|
||||||
#include <wlr/util/log.h>
|
#include <wlr/util/log.h>
|
||||||
#include "backend/libinput.h"
|
#include "backend/libinput.h"
|
||||||
#include "util/env.h"
|
#include "util/env.h"
|
||||||
|
#include <libudev.h>
|
||||||
|
|
||||||
static struct wlr_libinput_backend *get_libinput_backend_from_backend(
|
static struct wlr_libinput_backend *get_libinput_backend_from_backend(
|
||||||
struct wlr_backend *wlr_backend) {
|
struct wlr_backend *wlr_backend) {
|
||||||
|
|
@ -192,7 +193,7 @@ struct wlr_backend *wlr_libinput_backend_create(struct wlr_session *session) {
|
||||||
backend->session = session;
|
backend->session = session;
|
||||||
|
|
||||||
backend->libinput_context = libinput_udev_create_context(&libinput_impl,
|
backend->libinput_context = libinput_udev_create_context(&libinput_impl,
|
||||||
backend, backend->session->udev);
|
backend, udev_new());
|
||||||
if (!backend->libinput_context) {
|
if (!backend->libinput_context) {
|
||||||
wlr_log(WLR_ERROR, "Failed to create libinput context");
|
wlr_log(WLR_ERROR, "Failed to create libinput context");
|
||||||
wlr_backend_finish(&backend->backend);
|
wlr_backend_finish(&backend->backend);
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue