diff options
| author | Berke Güzel <wenekar1@gmail.com> | 2026-10-13 14:14:28 +0300 |
|---|---|---|
| committer | Berke Güzel <wenekar1@gmail.com> | 2026-10-13 14:14:28 +0300 |
| commit | 339e1ad7adb8340732ee856d0f6f0d2c7f1455d1 (patch) | |
| tree | 55d2735987f240e5eaacf6581ed3ce5db2c0e3a8 /src/platform/wayland/drag.c | |
| parent | e185a9d719d469a0fd7edcf09a6342f7b10cbb8e (diff) | |
Inline trivial internal helpers at their call sites
Diffstat (limited to 'src/platform/wayland/drag.c')
| -rw-r--r-- | src/platform/wayland/drag.c | 10 |
1 files changed, 7 insertions, 3 deletions
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); |
