mirror of
https://gitlab.freedesktop.org/wlroots/wlroots.git
synced 2025-11-02 09:01:38 -05:00
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.
This commit is contained in:
parent
889150f866
commit
b821be5749
10 changed files with 13 additions and 13 deletions
|
|
@ -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;
|
||||
|
|
|
|||
|
|
@ -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"
|
||||
|
|
|
|||
|
|
@ -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);
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue