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/popup.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'src/platform/wayland/popup.c') diff --git a/src/platform/wayland/popup.c b/src/platform/wayland/popup.c index 3a85435..fd415c9 100644 --- a/src/platform/wayland/popup.c +++ b/src/platform/wayland/popup.c @@ -41,8 +41,8 @@ static bool popup_apply_spec(struct wayland_surface *w, const struct yasl_popup_ { uint32_t scale = w->parent->scale_120; struct yasl_vector2i logical = { - .x = logical_px_ceil(spec->size.x, scale), - .y = logical_px_ceil(spec->size.y, scale), + .x = (int)(((int64_t)spec->size.x * YASL_SCALE_UNIT + scale - 1) / scale), + .y = (int)(((int64_t)spec->size.y * YASL_SCALE_UNIT + scale - 1) / scale), }; int width = device_px(logical.x, scale); int height = device_px(logical.y, scale); @@ -128,7 +128,7 @@ struct wayland_surface *wayland_surface_create_popup(struct wayland_surface *par const struct yasl_popup_spec *spec) { struct wayland_display *c = parent ? parent->conn : NULL; - struct seat *seat = c ? conn_active_seat(c) : NULL; + struct seat *seat = c ? (c->active_seat ? c->active_seat : c->seats) : NULL; if (!c || c->lost || parent->closed || !parent->xdg_surface || !seat || !seat->input_serial || !popup_spec_valid(parent, spec)) return NULL; -- cgit v1.2.3