From ce2f53a2f9f0852d8a14fc2dc757b6773ecd0f61 Mon Sep 17 00:00:00 2001 From: Marius Vlad Date: Tue, 21 Apr 2026 11:52:34 +0300 Subject: [PATCH] input: Remove notify_motion_absolute We're now able to use the mask to pass the proper type so need for a specialized version. Signed-off-by: Marius Vlad --- libweston/backend-rdp/rdp.c | 4 ++-- libweston/backend-vnc/vnc.c | 2 +- libweston/backend-wayland/wayland.c | 2 +- libweston/backend.h | 3 --- libweston/input.c | 11 ----------- libweston/libinput-device.c | 2 +- 6 files changed, 5 insertions(+), 19 deletions(-) diff --git a/libweston/backend-rdp/rdp.c b/libweston/backend-rdp/rdp.c index d372821bd..d68e47b7c 100644 --- a/libweston/backend-rdp/rdp.c +++ b/libweston/backend-rdp/rdp.c @@ -1291,7 +1291,7 @@ rdp_translate_and_notify_mouse_position(RdpPeerContext *peerContext, UINT16 x, U peerContext->item.seat, WESTON_POINTER_MOTION_ABS, &pos, NULL, NULL); - notify_motion_absolute(&event); + notify_motion(&event); return TRUE; } return FALSE; @@ -1530,7 +1530,7 @@ xf_extendedMouseEvent(rdpInput *input, UINT16 flags, UINT16 x, UINT16 y) weston_pointer_motion_event_init(&event, &time, peerContext->item.seat, WESTON_POINTER_MOTION_ABS, &pos, NULL, NULL); - notify_motion_absolute(&event); + notify_motion(&event); need_frame = true; } diff --git a/libweston/backend-vnc/vnc.c b/libweston/backend-vnc/vnc.c index 109962d96..7e8b89f08 100644 --- a/libweston/backend-vnc/vnc.c +++ b/libweston/backend-vnc/vnc.c @@ -455,7 +455,7 @@ vnc_pointer_event(struct nvnc_client *client, uint16_t x, uint16_t y, weston_pointer_motion_event_init(&event, &time, peer->seat, WESTON_POINTER_MOTION_ABS, &pos, NULL, NULL); - notify_motion_absolute(&event); + notify_motion(&event); } changed_button_mask = peer->last_button_mask ^ button_mask; diff --git a/libweston/backend-wayland/wayland.c b/libweston/backend-wayland/wayland.c index acb4b20c2..943f660e1 100644 --- a/libweston/backend-wayland/wayland.c +++ b/libweston/backend-wayland/wayland.c @@ -1722,7 +1722,7 @@ input_handle_motion(void *data, struct wl_pointer *pointer, weston_pointer_motion_event_init(&event, &ts, &input->base, WESTON_POINTER_MOTION_ABS, &pos, NULL, NULL); - notify_motion_absolute(&event); + notify_motion(&event); want_frame = true; } diff --git a/libweston/backend.h b/libweston/backend.h index bbaa7765a..9ee20e643 100644 --- a/libweston/backend.h +++ b/libweston/backend.h @@ -253,9 +253,6 @@ notify_keyboard_focus_out(struct weston_seat *seat); void notify_motion(const struct weston_pointer_motion_event *event); -void -notify_motion_absolute(const struct weston_pointer_motion_event *event); - void notify_modifiers(struct weston_seat *seat, uint32_t serial); diff --git a/libweston/input.c b/libweston/input.c index f796df4ff..2f64c0b79 100644 --- a/libweston/input.c +++ b/libweston/input.c @@ -2284,17 +2284,6 @@ run_modifier_bindings(struct weston_seat *seat, uint32_t old, uint32_t new) } } -WL_EXPORT void -notify_motion_absolute(const struct weston_pointer_motion_event *event) -{ - struct weston_seat *seat = event->base.seat; - struct weston_compositor *ec = seat->compositor; - struct weston_pointer *pointer = weston_seat_get_pointer(seat); - - weston_compositor_wake(ec); - pointer->grab->interface->motion(pointer->grab, event); -} - static unsigned int peek_next_activate_serial(struct weston_compositor *c) { diff --git a/libweston/libinput-device.c b/libweston/libinput-device.c index 3506b2b72..900f59427 100644 --- a/libweston/libinput-device.c +++ b/libweston/libinput-device.c @@ -178,7 +178,7 @@ handle_pointer_motion_absolute( weston_pointer_motion_event_init(&event, &time, device->seat, WESTON_POINTER_MOTION_ABS, &pos, NULL, NULL); - notify_motion_absolute(&event); + notify_motion(&event); return true; }