aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorIsaac Freund <mail@isaacfreund.com>2024-02-29 13:31:00 +0100
committerIsaac Freund <mail@isaacfreund.com>2024-02-29 16:09:07 +0100
commitb821be5749061b0b73d777cb2fc74204cbf78278 (patch)
treee67d855a13f592f6e06afef8b34b96ec00a4f1c3
parent889150f8660a3e802d377670e57f3951c9266510 (diff)
input-device: unconfuse tablet naming
WLR_INPUT_DEVICE_TABLET_TOOL is renamed to WLR_INPUT_DEVICE_TABLET The input device corresponds to wlr_tablet, not wlr_tablet_tool.
-rw-r--r--backend/libinput/backend.c2
-rw-r--r--backend/libinput/events.c2
-rw-r--r--backend/wayland/seat.c2
-rw-r--r--examples/pointer.c2
-rw-r--r--examples/tablet.c2
-rw-r--r--include/wlr/types/wlr_cursor.h2
-rw-r--r--include/wlr/types/wlr_input_device.h2
-rw-r--r--types/tablet_v2/wlr_tablet_v2_tablet.c2
-rw-r--r--types/wlr_cursor.c6
-rw-r--r--types/wlr_tablet_tool.c4
10 files changed, 13 insertions, 13 deletions
diff --git a/backend/libinput/backend.c b/backend/libinput/backend.c
index bea999fd..6e59ee3e 100644
--- a/backend/libinput/backend.c
+++ b/backend/libinput/backend.c
@@ -220,7 +220,7 @@ struct libinput_device *wlr_libinput_get_device_handle(
case WLR_INPUT_DEVICE_TOUCH:
dev = device_from_touch(wlr_touch_from_input_device(wlr_dev));
break;
- case WLR_INPUT_DEVICE_TABLET_TOOL:
+ case WLR_INPUT_DEVICE_TABLET:
dev = device_from_tablet(wlr_tablet_from_input_device(wlr_dev));
break;
case WLR_INPUT_DEVICE_TABLET_PAD:
diff --git a/backend/libinput/events.c b/backend/libinput/events.c
index 1bf70ce2..25e71b72 100644
--- a/backend/libinput/events.c
+++ b/backend/libinput/events.c
@@ -47,7 +47,7 @@ bool wlr_input_device_is_libinput(struct wlr_input_device *wlr_dev) {
case WLR_INPUT_DEVICE_TOUCH:
return wlr_touch_from_input_device(wlr_dev)->impl ==
&libinput_touch_impl;
- case WLR_INPUT_DEVICE_TABLET_TOOL:
+ case WLR_INPUT_DEVICE_TABLET:
return wlr_tablet_from_input_device(wlr_dev)-> impl ==
&libinput_tablet_impl;
case WLR_INPUT_DEVICE_TABLET_PAD:
diff --git a/backend/wayland/seat.c b/backend/wayland/seat.c
index 0de149bb..1fa7e3e4 100644
--- a/backend/wayland/seat.c
+++ b/backend/wayland/seat.c
@@ -313,7 +313,7 @@ bool wlr_input_device_is_wl(struct wlr_input_device *dev) {
return wlr_pointer_from_input_device(dev)->impl == &wl_pointer_impl;
case WLR_INPUT_DEVICE_TOUCH:
return wlr_touch_from_input_device(dev)->impl == &touch_impl;
- case WLR_INPUT_DEVICE_TABLET_TOOL:
+ case WLR_INPUT_DEVICE_TABLET:
return wlr_tablet_from_input_device(dev)-> impl == &wl_tablet_impl;
case WLR_INPUT_DEVICE_TABLET_PAD:
return wlr_tablet_pad_from_input_device(dev)->impl == &wl_tablet_pad_impl;
diff --git a/examples/pointer.c b/examples/pointer.c
index 81529e88..fed37a5b 100644
--- a/examples/pointer.c
+++ b/examples/pointer.c
@@ -298,7 +298,7 @@ static void new_input_notify(struct wl_listener *listener, void *data) {
switch (device->type) {
case WLR_INPUT_DEVICE_POINTER:
case WLR_INPUT_DEVICE_TOUCH:
- case WLR_INPUT_DEVICE_TABLET_TOOL:
+ case WLR_INPUT_DEVICE_TABLET:
wlr_cursor_attach_input_device(state->cursor, device);
break;
diff --git a/examples/tablet.c b/examples/tablet.c
index 7e9116a8..8f0754df 100644
--- a/examples/tablet.c
+++ b/examples/tablet.c
@@ -351,7 +351,7 @@ static void new_input_notify(struct wl_listener *listener, void *data) {
wl_signal_add(&pstate->wlr_tablet_pad->events.ring, &pstate->ring);
wl_list_insert(&sample->tablet_pads, &pstate->link);
break;
- case WLR_INPUT_DEVICE_TABLET_TOOL:;
+ case WLR_INPUT_DEVICE_TABLET:;
struct wlr_tablet *tablet = wlr_tablet_from_input_device(device);
sample->width_mm = tablet->width_mm == 0 ?
20 : tablet->width_mm;
diff --git a/include/wlr/types/wlr_cursor.h b/include/wlr/types/wlr_cursor.h
index 004be0f1..57d6e508 100644
--- a/include/wlr/types/wlr_cursor.h
+++ b/include/wlr/types/wlr_cursor.h
@@ -171,7 +171,7 @@ void wlr_cursor_set_surface(struct wlr_cursor *cur, struct wlr_surface *surface,
*
* - WLR_INPUT_DEVICE_POINTER
* - WLR_INPUT_DEVICE_TOUCH
- * - WLR_INPUT_DEVICE_TABLET_TOOL
+ * - WLR_INPUT_DEVICE_TABLET
*/
void wlr_cursor_attach_input_device(struct wlr_cursor *cur,
struct wlr_input_device *dev);
diff --git a/include/wlr/types/wlr_input_device.h b/include/wlr/types/wlr_input_device.h
index 3e47dc47..24a02483 100644
--- a/include/wlr/types/wlr_input_device.h
+++ b/include/wlr/types/wlr_input_device.h
@@ -23,7 +23,7 @@ enum wlr_input_device_type {
WLR_INPUT_DEVICE_KEYBOARD, // struct wlr_keyboard
WLR_INPUT_DEVICE_POINTER, // struct wlr_pointer
WLR_INPUT_DEVICE_TOUCH, // struct wlr_touch
- WLR_INPUT_DEVICE_TABLET_TOOL, // struct wlr_tablet
+ WLR_INPUT_DEVICE_TABLET, // struct wlr_tablet
WLR_INPUT_DEVICE_TABLET_PAD, // struct wlr_tablet_pad
WLR_INPUT_DEVICE_SWITCH, // struct wlr_switch
};
diff --git a/types/tablet_v2/wlr_tablet_v2_tablet.c b/types/tablet_v2/wlr_tablet_v2_tablet.c
index 4c49c20b..7e2de0b0 100644
--- a/types/tablet_v2/wlr_tablet_v2_tablet.c
+++ b/types/tablet_v2/wlr_tablet_v2_tablet.c
@@ -51,7 +51,7 @@ struct wlr_tablet_v2_tablet *wlr_tablet_create(
struct wlr_tablet_manager_v2 *manager,
struct wlr_seat *wlr_seat,
struct wlr_input_device *wlr_device) {
- assert(wlr_device->type == WLR_INPUT_DEVICE_TABLET_TOOL);
+ assert(wlr_device->type == WLR_INPUT_DEVICE_TABLET);
struct wlr_tablet_seat_v2 *seat = get_or_create_tablet_seat(manager, wlr_seat);
if (!seat) {
return NULL;
diff --git a/types/wlr_cursor.c b/types/wlr_cursor.c
index d49c8e3f..77ab2fb7 100644
--- a/types/wlr_cursor.c
+++ b/types/wlr_cursor.c
@@ -207,7 +207,7 @@ static void cursor_device_destroy(struct wlr_cursor_device *c_device) {
wl_list_remove(&c_device->touch_cancel.link);
wl_list_remove(&c_device->touch_frame.link);
break;
- case WLR_INPUT_DEVICE_TABLET_TOOL:
+ case WLR_INPUT_DEVICE_TABLET:
wl_list_remove(&c_device->tablet_tool_axis.link);
wl_list_remove(&c_device->tablet_tool_proximity.link);
wl_list_remove(&c_device->tablet_tool_tip.link);
@@ -1020,7 +1020,7 @@ static struct wlr_cursor_device *cursor_device_create(
c_device->touch_frame.notify = handle_touch_frame;
break;
- case WLR_INPUT_DEVICE_TABLET_TOOL:;
+ case WLR_INPUT_DEVICE_TABLET:;
struct wlr_tablet *tablet = wlr_tablet_from_input_device(device);
wl_signal_add(&tablet->events.tip, &c_device->tablet_tool_tip);
@@ -1052,7 +1052,7 @@ void wlr_cursor_attach_input_device(struct wlr_cursor *cur,
switch (dev->type) {
case WLR_INPUT_DEVICE_POINTER:
case WLR_INPUT_DEVICE_TOUCH:
- case WLR_INPUT_DEVICE_TABLET_TOOL:
+ case WLR_INPUT_DEVICE_TABLET:
break;
default:
wlr_log(WLR_ERROR, "only device types of pointer, touch or tablet tool"
diff --git a/types/wlr_tablet_tool.c b/types/wlr_tablet_tool.c
index fbab01e3..77f4631e 100644
--- a/types/wlr_tablet_tool.c
+++ b/types/wlr_tablet_tool.c
@@ -9,7 +9,7 @@
struct wlr_tablet *wlr_tablet_from_input_device(
struct wlr_input_device *input_device) {
- assert(input_device->type == WLR_INPUT_DEVICE_TABLET_TOOL);
+ assert(input_device->type == WLR_INPUT_DEVICE_TABLET);
return wl_container_of(input_device, (struct wlr_tablet *)NULL, base);
}
@@ -18,7 +18,7 @@ void wlr_tablet_init(struct wlr_tablet *tablet,
*tablet = (struct wlr_tablet){
.impl = impl,
};
- wlr_input_device_init(&tablet->base, WLR_INPUT_DEVICE_TABLET_TOOL, name);
+ wlr_input_device_init(&tablet->base, WLR_INPUT_DEVICE_TABLET, name);
wl_signal_init(&tablet->events.axis);
wl_signal_init(&tablet->events.proximity);