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/popup.c | |
| parent | e185a9d719d469a0fd7edcf09a6342f7b10cbb8e (diff) | |
Inline trivial internal helpers at their call sites
Diffstat (limited to 'src/platform/wayland/popup.c')
| -rw-r--r-- | src/platform/wayland/popup.c | 6 |
1 files changed, 3 insertions, 3 deletions
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; |
