diff options
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; |
