aboutsummaryrefslogtreecommitdiff
path: root/backend/libinput
diff options
context:
space:
mode:
Diffstat (limited to 'backend/libinput')
-rw-r--r--backend/libinput/backend.c22
-rw-r--r--backend/libinput/events.c10
-rw-r--r--backend/libinput/keyboard.c2
-rw-r--r--backend/libinput/pointer.c10
-rw-r--r--backend/libinput/tablet_pad.c8
-rw-r--r--backend/libinput/tablet_tool.c10
-rw-r--r--backend/libinput/touch.c10
7 files changed, 36 insertions, 36 deletions
diff --git a/backend/libinput/backend.c b/backend/libinput/backend.c
index 1dde5854..19dc779d 100644
--- a/backend/libinput/backend.c
+++ b/backend/libinput/backend.c
@@ -26,7 +26,7 @@ static const struct libinput_interface libinput_impl = {
static int handle_libinput_readable(int fd, uint32_t mask, void *_backend) {
struct wlr_libinput_backend *backend = _backend;
if (libinput_dispatch(backend->libinput_context) != 0) {
- wlr_log(L_ERROR, "Failed to dispatch libinput");
+ wlr_log(WLR_ERROR, "Failed to dispatch libinput");
// TODO: some kind of abort?
return 0;
}
@@ -40,24 +40,24 @@ static int handle_libinput_readable(int fd, uint32_t mask, void *_backend) {
static void log_libinput(struct libinput *libinput_context,
enum libinput_log_priority priority, const char *fmt, va_list args) {
- _wlr_vlog(L_ERROR, fmt, args);
+ _wlr_vlog(WLR_ERROR, fmt, args);
}
static bool backend_start(struct wlr_backend *_backend) {
struct wlr_libinput_backend *backend =
(struct wlr_libinput_backend *)_backend;
- wlr_log(L_DEBUG, "Initializing libinput");
+ wlr_log(WLR_DEBUG, "Initializing libinput");
backend->libinput_context = libinput_udev_create_context(&libinput_impl,
backend, backend->session->udev);
if (!backend->libinput_context) {
- wlr_log(L_ERROR, "Failed to create libinput context");
+ wlr_log(WLR_ERROR, "Failed to create libinput context");
return false;
}
if (libinput_udev_assign_seat(backend->libinput_context,
backend->session->seat) != 0) {
- wlr_log(L_ERROR, "Failed to assign libinput seat");
+ wlr_log(WLR_ERROR, "Failed to assign libinput seat");
return false;
}
@@ -75,8 +75,8 @@ static bool backend_start(struct wlr_backend *_backend) {
if (!no_devs && backend->wlr_device_lists.length == 0) {
handle_libinput_readable(libinput_fd, WL_EVENT_READABLE, backend);
if (backend->wlr_device_lists.length == 0) {
- wlr_log(L_ERROR, "libinput initialization failed, no input devices");
- wlr_log(L_ERROR, "Set WLR_LIBINPUT_NO_DEVICES=1 to suppress this check");
+ wlr_log(WLR_ERROR, "libinput initialization failed, no input devices");
+ wlr_log(WLR_ERROR, "Set WLR_LIBINPUT_NO_DEVICES=1 to suppress this check");
return false;
}
}
@@ -89,10 +89,10 @@ static bool backend_start(struct wlr_backend *_backend) {
backend->input_event = wl_event_loop_add_fd(event_loop, libinput_fd,
WL_EVENT_READABLE, handle_libinput_readable, backend);
if (!backend->input_event) {
- wlr_log(L_ERROR, "Failed to create input event on event loop");
+ wlr_log(WLR_ERROR, "Failed to create input event on event loop");
return false;
}
- wlr_log(L_DEBUG, "libinput successfully initialized");
+ wlr_log(WLR_DEBUG, "libinput successfully initialized");
return true;
}
@@ -162,13 +162,13 @@ struct wlr_backend *wlr_libinput_backend_create(struct wl_display *display,
struct wlr_libinput_backend *backend = calloc(1, sizeof(struct wlr_libinput_backend));
if (!backend) {
- wlr_log(L_ERROR, "Allocation failed: %s", strerror(errno));
+ wlr_log(WLR_ERROR, "Allocation failed: %s", strerror(errno));
return NULL;
}
wlr_backend_init(&backend->backend, &backend_impl);
if (!wlr_list_init(&backend->wlr_device_lists)) {
- wlr_log(L_ERROR, "Allocation failed: %s", strerror(errno));
+ wlr_log(WLR_ERROR, "Allocation failed: %s", strerror(errno));
goto error_backend;
}
diff --git a/backend/libinput/events.c b/backend/libinput/events.c
index 2e4b7f84..93664af2 100644
--- a/backend/libinput/events.c
+++ b/backend/libinput/events.c
@@ -79,11 +79,11 @@ static void handle_device_added(struct wlr_libinput_backend *backend,
const char *name = libinput_device_get_name(libinput_dev);
struct wl_list *wlr_devices = calloc(1, sizeof(struct wl_list));
if (!wlr_devices) {
- wlr_log(L_ERROR, "Allocation failed");
+ wlr_log(WLR_ERROR, "Allocation failed");
return;
}
wl_list_init(wlr_devices);
- wlr_log(L_DEBUG, "Added %s [%d:%d]", name, vendor, product);
+ wlr_log(WLR_DEBUG, "Added %s [%d:%d]", name, vendor, product);
if (libinput_device_has_capability(libinput_dev, LIBINPUT_DEVICE_CAP_KEYBOARD)) {
struct wlr_input_device *wlr_dev = allocate_device(backend,
@@ -166,7 +166,7 @@ static void handle_device_added(struct wlr_libinput_backend *backend,
return;
fail:
- wlr_log(L_ERROR, "Could not allocate new device");
+ wlr_log(WLR_ERROR, "Could not allocate new device");
struct wlr_input_device *dev, *tmp_dev;
wl_list_for_each_safe(dev, tmp_dev, wlr_devices, link) {
free(dev);
@@ -180,7 +180,7 @@ static void handle_device_removed(struct wlr_libinput_backend *backend,
int vendor = libinput_device_get_id_vendor(libinput_dev);
int product = libinput_device_get_id_product(libinput_dev);
const char *name = libinput_device_get_name(libinput_dev);
- wlr_log(L_DEBUG, "Removing %s [%d:%d]", name, vendor, product);
+ wlr_log(WLR_DEBUG, "Removing %s [%d:%d]", name, vendor, product);
if (!wlr_devices) {
return;
}
@@ -261,7 +261,7 @@ void handle_libinput_event(struct wlr_libinput_backend *backend,
handle_tablet_pad_strip(event, libinput_dev);
break;
default:
- wlr_log(L_DEBUG, "Unknown libinput event %d", event_type);
+ wlr_log(WLR_DEBUG, "Unknown libinput event %d", event_type);
break;
}
}
diff --git a/backend/libinput/keyboard.c b/backend/libinput/keyboard.c
index e17191e3..d0059e06 100644
--- a/backend/libinput/keyboard.c
+++ b/backend/libinput/keyboard.c
@@ -50,7 +50,7 @@ void handle_keyboard_key(struct libinput_event *event,
struct wlr_input_device *wlr_dev =
get_appropriate_device(WLR_INPUT_DEVICE_KEYBOARD, libinput_dev);
if (!wlr_dev) {
- wlr_log(L_DEBUG, "Got a keyboard event for a device with no keyboards?");
+ wlr_log(WLR_DEBUG, "Got a keyboard event for a device with no keyboards?");
return;
}
struct libinput_event_keyboard *kbevent =
diff --git a/backend/libinput/pointer.c b/backend/libinput/pointer.c
index f628cf22..fb85cddd 100644
--- a/backend/libinput/pointer.c
+++ b/backend/libinput/pointer.c
@@ -13,7 +13,7 @@ struct wlr_pointer *create_libinput_pointer(
assert(libinput_dev);
struct wlr_pointer *wlr_pointer = calloc(1, sizeof(struct wlr_pointer));
if (!wlr_pointer) {
- wlr_log(L_ERROR, "Unable to allocate wlr_pointer");
+ wlr_log(WLR_ERROR, "Unable to allocate wlr_pointer");
return NULL;
}
wlr_pointer_init(wlr_pointer, NULL);
@@ -25,7 +25,7 @@ void handle_pointer_motion(struct libinput_event *event,
struct wlr_input_device *wlr_dev =
get_appropriate_device(WLR_INPUT_DEVICE_POINTER, libinput_dev);
if (!wlr_dev) {
- wlr_log(L_DEBUG, "Got a pointer event for a device with no pointers?");
+ wlr_log(WLR_DEBUG, "Got a pointer event for a device with no pointers?");
return;
}
struct libinput_event_pointer *pevent =
@@ -44,7 +44,7 @@ void handle_pointer_motion_abs(struct libinput_event *event,
struct wlr_input_device *wlr_dev =
get_appropriate_device(WLR_INPUT_DEVICE_POINTER, libinput_dev);
if (!wlr_dev) {
- wlr_log(L_DEBUG, "Got a pointer event for a device with no pointers?");
+ wlr_log(WLR_DEBUG, "Got a pointer event for a device with no pointers?");
return;
}
struct libinput_event_pointer *pevent =
@@ -63,7 +63,7 @@ void handle_pointer_button(struct libinput_event *event,
struct wlr_input_device *wlr_dev =
get_appropriate_device(WLR_INPUT_DEVICE_POINTER, libinput_dev);
if (!wlr_dev) {
- wlr_log(L_DEBUG, "Got a pointer event for a device with no pointers?");
+ wlr_log(WLR_DEBUG, "Got a pointer event for a device with no pointers?");
return;
}
struct libinput_event_pointer *pevent =
@@ -89,7 +89,7 @@ void handle_pointer_axis(struct libinput_event *event,
struct wlr_input_device *wlr_dev =
get_appropriate_device(WLR_INPUT_DEVICE_POINTER, libinput_dev);
if (!wlr_dev) {
- wlr_log(L_DEBUG, "Got a pointer event for a device with no pointers?");
+ wlr_log(WLR_DEBUG, "Got a pointer event for a device with no pointers?");
return;
}
struct libinput_event_pointer *pevent =
diff --git a/backend/libinput/tablet_pad.c b/backend/libinput/tablet_pad.c
index aa8b26d9..626c2219 100644
--- a/backend/libinput/tablet_pad.c
+++ b/backend/libinput/tablet_pad.c
@@ -13,7 +13,7 @@ struct wlr_tablet_pad *create_libinput_tablet_pad(
assert(libinput_dev);
struct wlr_tablet_pad *wlr_tablet_pad = calloc(1, sizeof(struct wlr_tablet_pad));
if (!wlr_tablet_pad) {
- wlr_log(L_ERROR, "Unable to allocate wlr_tablet_pad");
+ wlr_log(WLR_ERROR, "Unable to allocate wlr_tablet_pad");
return NULL;
}
wlr_tablet_pad_init(wlr_tablet_pad, NULL);
@@ -25,7 +25,7 @@ void handle_tablet_pad_button(struct libinput_event *event,
struct wlr_input_device *wlr_dev =
get_appropriate_device(WLR_INPUT_DEVICE_TABLET_PAD, libinput_dev);
if (!wlr_dev) {
- wlr_log(L_DEBUG, "Got a tablet pad event for a device with no tablet pad?");
+ wlr_log(WLR_DEBUG, "Got a tablet pad event for a device with no tablet pad?");
return;
}
struct libinput_event_tablet_pad *pevent =
@@ -51,7 +51,7 @@ void handle_tablet_pad_ring(struct libinput_event *event,
struct wlr_input_device *wlr_dev =
get_appropriate_device(WLR_INPUT_DEVICE_TABLET_PAD, libinput_dev);
if (!wlr_dev) {
- wlr_log(L_DEBUG, "Got a tablet pad event for a device with no tablet pad?");
+ wlr_log(WLR_DEBUG, "Got a tablet pad event for a device with no tablet pad?");
return;
}
struct libinput_event_tablet_pad *pevent =
@@ -78,7 +78,7 @@ void handle_tablet_pad_strip(struct libinput_event *event,
struct wlr_input_device *wlr_dev =
get_appropriate_device(WLR_INPUT_DEVICE_TABLET_PAD, libinput_dev);
if (!wlr_dev) {
- wlr_log(L_DEBUG, "Got a tablet pad event for a device with no tablet pad?");
+ wlr_log(WLR_DEBUG, "Got a tablet pad event for a device with no tablet pad?");
return;
}
struct libinput_event_tablet_pad *pevent =
diff --git a/backend/libinput/tablet_tool.c b/backend/libinput/tablet_tool.c
index b0bcfff5..e9308b65 100644
--- a/backend/libinput/tablet_tool.c
+++ b/backend/libinput/tablet_tool.c
@@ -13,7 +13,7 @@ struct wlr_tablet_tool *create_libinput_tablet_tool(
assert(libinput_dev);
struct wlr_tablet_tool *wlr_tablet_tool = calloc(1, sizeof(struct wlr_tablet_tool));
if (!wlr_tablet_tool) {
- wlr_log(L_ERROR, "Unable to allocate wlr_tablet_tool");
+ wlr_log(WLR_ERROR, "Unable to allocate wlr_tablet_tool");
return NULL;
}
wlr_tablet_tool_init(wlr_tablet_tool, NULL);
@@ -25,7 +25,7 @@ void handle_tablet_tool_axis(struct libinput_event *event,
struct wlr_input_device *wlr_dev =
get_appropriate_device(WLR_INPUT_DEVICE_TABLET_TOOL, libinput_dev);
if (!wlr_dev) {
- wlr_log(L_DEBUG, "Got a tablet tool event for a device with no tablet tools?");
+ wlr_log(WLR_DEBUG, "Got a tablet tool event for a device with no tablet tools?");
return;
}
struct libinput_event_tablet_tool *tevent =
@@ -78,7 +78,7 @@ void handle_tablet_tool_proximity(struct libinput_event *event,
struct wlr_input_device *wlr_dev =
get_appropriate_device(WLR_INPUT_DEVICE_TABLET_TOOL, libinput_dev);
if (!wlr_dev) {
- wlr_log(L_DEBUG, "Got a tablet tool event for a device with no tablet tools?");
+ wlr_log(WLR_DEBUG, "Got a tablet tool event for a device with no tablet tools?");
return;
}
struct libinput_event_tablet_tool *tevent =
@@ -104,7 +104,7 @@ void handle_tablet_tool_tip(struct libinput_event *event,
struct wlr_input_device *wlr_dev =
get_appropriate_device(WLR_INPUT_DEVICE_TABLET_TOOL, libinput_dev);
if (!wlr_dev) {
- wlr_log(L_DEBUG, "Got a tablet tool event for a device with no tablet tools?");
+ wlr_log(WLR_DEBUG, "Got a tablet tool event for a device with no tablet tools?");
return;
}
handle_tablet_tool_axis(event, libinput_dev);
@@ -130,7 +130,7 @@ void handle_tablet_tool_button(struct libinput_event *event,
struct wlr_input_device *wlr_dev =
get_appropriate_device(WLR_INPUT_DEVICE_TABLET_TOOL, libinput_dev);
if (!wlr_dev) {
- wlr_log(L_DEBUG, "Got a tablet tool event for a device with no tablet tools?");
+ wlr_log(WLR_DEBUG, "Got a tablet tool event for a device with no tablet tools?");
return;
}
handle_tablet_tool_axis(event, libinput_dev);
diff --git a/backend/libinput/touch.c b/backend/libinput/touch.c
index d79b2a97..cb9b0e36 100644
--- a/backend/libinput/touch.c
+++ b/backend/libinput/touch.c
@@ -13,7 +13,7 @@ struct wlr_touch *create_libinput_touch(
assert(libinput_dev);
struct wlr_touch *wlr_touch = calloc(1, sizeof(struct wlr_touch));
if (!wlr_touch) {
- wlr_log(L_ERROR, "Unable to allocate wlr_touch");
+ wlr_log(WLR_ERROR, "Unable to allocate wlr_touch");
return NULL;
}
wlr_touch_init(wlr_touch, NULL);
@@ -25,7 +25,7 @@ void handle_touch_down(struct libinput_event *event,
struct wlr_input_device *wlr_dev =
get_appropriate_device(WLR_INPUT_DEVICE_TOUCH, libinput_dev);
if (!wlr_dev) {
- wlr_log(L_DEBUG, "Got a touch event for a device with no touch?");
+ wlr_log(WLR_DEBUG, "Got a touch event for a device with no touch?");
return;
}
struct libinput_event_touch *tevent =
@@ -45,7 +45,7 @@ void handle_touch_up(struct libinput_event *event,
struct wlr_input_device *wlr_dev =
get_appropriate_device(WLR_INPUT_DEVICE_TOUCH, libinput_dev);
if (!wlr_dev) {
- wlr_log(L_DEBUG, "Got a touch event for a device with no touch?");
+ wlr_log(WLR_DEBUG, "Got a touch event for a device with no touch?");
return;
}
struct libinput_event_touch *tevent =
@@ -63,7 +63,7 @@ void handle_touch_motion(struct libinput_event *event,
struct wlr_input_device *wlr_dev =
get_appropriate_device(WLR_INPUT_DEVICE_TOUCH, libinput_dev);
if (!wlr_dev) {
- wlr_log(L_DEBUG, "Got a touch event for a device with no touch?");
+ wlr_log(WLR_DEBUG, "Got a touch event for a device with no touch?");
return;
}
struct libinput_event_touch *tevent =
@@ -83,7 +83,7 @@ void handle_touch_cancel(struct libinput_event *event,
struct wlr_input_device *wlr_dev =
get_appropriate_device(WLR_INPUT_DEVICE_TOUCH, libinput_dev);
if (!wlr_dev) {
- wlr_log(L_DEBUG, "Got a touch event for a device with no touch?");
+ wlr_log(WLR_DEBUG, "Got a touch event for a device with no touch?");
return;
}
struct libinput_event_touch *tevent =