From 2058209a130f5051b59d8ebb24196409695deaaf Mon Sep 17 00:00:00 2001 From: Luofan Chen Date: Fri, 1 Mar 2024 11:43:14 +0800 Subject: input: Rename WLR_INPUT_DEVICE_TABLET_TOOL to WLR_INPUT_DEVICE_TABLET MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit wlroots has changed the naming, causing the following build errors when building: error: ‘WLR_INPUT_DEVICE_TABLET_TOOL’ undeclared --- sway/input/cursor.c | 4 ++-- sway/input/input-manager.c | 2 +- sway/input/seat.c | 10 +++++----- 3 files changed, 8 insertions(+), 8 deletions(-) (limited to 'sway/input') diff --git a/sway/input/cursor.c b/sway/input/cursor.c index 7d66a89d..3d04826c 100644 --- a/sway/input/cursor.c +++ b/sway/input/cursor.c @@ -243,7 +243,7 @@ static enum sway_input_idle_source idle_source_from_device( return IDLE_SOURCE_POINTER; case WLR_INPUT_DEVICE_TOUCH: return IDLE_SOURCE_TOUCH; - case WLR_INPUT_DEVICE_TABLET_TOOL: + case WLR_INPUT_DEVICE_TABLET: return IDLE_SOURCE_TABLET_TOOL; case WLR_INPUT_DEVICE_TABLET_PAD: return IDLE_SOURCE_TABLET_PAD; @@ -518,7 +518,7 @@ static void apply_mapping_from_region(struct wlr_input_device *device, double x1 = region->x1, x2 = region->x2; double y1 = region->y1, y2 = region->y2; - if (region->mm && device->type == WLR_INPUT_DEVICE_TABLET_TOOL) { + if (region->mm && device->type == WLR_INPUT_DEVICE_TABLET) { struct wlr_tablet *tablet = wlr_tablet_from_input_device(device); if (tablet->width_mm == 0 || tablet->height_mm == 0) { return; diff --git a/sway/input/input-manager.c b/sway/input/input-manager.c index 9ee635af..056cc3ea 100644 --- a/sway/input/input-manager.c +++ b/sway/input/input-manager.c @@ -111,7 +111,7 @@ const char *input_device_get_type(struct sway_input_device *device) { return "keyboard"; case WLR_INPUT_DEVICE_TOUCH: return "touch"; - case WLR_INPUT_DEVICE_TABLET_TOOL: + case WLR_INPUT_DEVICE_TABLET: return "tablet_tool"; case WLR_INPUT_DEVICE_TABLET_PAD: return "tablet_pad"; diff --git a/sway/input/seat.c b/sway/input/seat.c index 7ae29828..f2486893 100644 --- a/sway/input/seat.c +++ b/sway/input/seat.c @@ -607,7 +607,7 @@ static void seat_update_capabilities(struct sway_seat *seat) { case WLR_INPUT_DEVICE_TOUCH: caps |= WL_SEAT_CAPABILITY_TOUCH; break; - case WLR_INPUT_DEVICE_TABLET_TOOL: + case WLR_INPUT_DEVICE_TABLET: caps |= WL_SEAT_CAPABILITY_POINTER; break; case WLR_INPUT_DEVICE_SWITCH: @@ -665,7 +665,7 @@ static const char *get_builtin_output_name(void) { static bool is_touch_or_tablet_tool(struct sway_seat_device *seat_device) { switch (seat_device->input_device->wlr_device->type) { case WLR_INPUT_DEVICE_TOUCH: - case WLR_INPUT_DEVICE_TABLET_TOOL: + case WLR_INPUT_DEVICE_TABLET: return true; default: return false; @@ -680,7 +680,7 @@ static void seat_apply_input_mapping(struct sway_seat *seat, switch (sway_device->input_device->wlr_device->type) { case WLR_INPUT_DEVICE_POINTER: case WLR_INPUT_DEVICE_TOUCH: - case WLR_INPUT_DEVICE_TABLET_TOOL: + case WLR_INPUT_DEVICE_TABLET: break; default: return; // these devices don't support mappings @@ -873,7 +873,7 @@ void seat_configure_device(struct sway_seat *seat, case WLR_INPUT_DEVICE_TOUCH: seat_configure_touch(seat, seat_device); break; - case WLR_INPUT_DEVICE_TABLET_TOOL: + case WLR_INPUT_DEVICE_TABLET: seat_configure_tablet_tool(seat, seat_device); break; case WLR_INPUT_DEVICE_TABLET_PAD: @@ -912,7 +912,7 @@ void seat_reset_device(struct sway_seat *seat, case WLR_INPUT_DEVICE_TOUCH: seat_reset_input_config(seat, seat_device); break; - case WLR_INPUT_DEVICE_TABLET_TOOL: + case WLR_INPUT_DEVICE_TABLET: seat_reset_input_config(seat, seat_device); break; case WLR_INPUT_DEVICE_TABLET_PAD: -- cgit v1.2.3-54-g00ecf