From 339e1ad7adb8340732ee856d0f6f0d2c7f1455d1 Mon Sep 17 00:00:00 2001 From: Berke Güzel Date: Tue, 13 Oct 2026 14:14:28 +0300 Subject: Inline trivial internal helpers at their call sites --- src/platform/wayland/drag.c | 10 +++++++--- 1 file changed, 7 insertions(+), 3 deletions(-) (limited to 'src/platform/wayland/drag.c') diff --git a/src/platform/wayland/drag.c b/src/platform/wayland/drag.c index 989dbb6..2cfd432 100644 --- a/src/platform/wayland/drag.c +++ b/src/platform/wayland/drag.c @@ -139,7 +139,7 @@ static const struct wl_data_source_listener source_listener = { static struct seat *drag_seat(struct wayland_display *c, struct wayland_surface *origin) { struct wayland_surface *root = surface_root(origin); - struct seat *active = conn_active_seat(c); + struct seat *active = c->active_seat ? c->active_seat : c->seats; if (active && active->press_serial && surface_root(active->press_surface) == root) return active; @@ -225,7 +225,9 @@ static struct yasl_vector2i drag_device_pos(const struct wayland_surface *w, dou void conn_drop_target(struct wayland_display *c, enum yasl_drop_event ev, struct wl_surface *on, double x, double y) { - struct wayland_surface *w = conn_surface_for(c, on); + (void)c; + struct wayland_surface *w = on ? + (struct wayland_surface *)wl_surface_get_user_data(on) : NULL; if (!w || w->parent || !w->cbs->drop) return; w->cbs->drop(&w->base, ev, drag_device_pos(w, x, y), w->ud); @@ -234,7 +236,9 @@ void conn_drop_target(struct wayland_display *c, enum yasl_drop_event ev, void conn_drag_target(struct wayland_display *c, enum yasl_drag_event ev, struct wl_surface *on, double x, double y) { - struct wayland_surface *w = conn_surface_for(c, on); + (void)c; + struct wayland_surface *w = on ? + (struct wayland_surface *)wl_surface_get_user_data(on) : NULL; if (!w || w->parent || !w->cbs->drag) return; w->cbs->drag(&w->base, ev, drag_device_pos(w, x, y), w->ud); -- cgit v1.2.3