From 5ef6ca21ab9e1cf4f69254234d190a634b777d52 Mon Sep 17 00:00:00 2001 From: Berke Güzel Date: Wed, 14 Oct 2026 09:38:31 +0300 Subject: Remove deprecated Cocoa OpenGL and private compatibility APIs --- src/platform/wayland/popup.c | 17 +++++------------ 1 file changed, 5 insertions(+), 12 deletions(-) (limited to 'src/platform/wayland/popup.c') diff --git a/src/platform/wayland/popup.c b/src/platform/wayland/popup.c index c563eb4..1ae4805 100644 --- a/src/platform/wayland/popup.c +++ b/src/platform/wayland/popup.c @@ -27,15 +27,14 @@ static bool popup_spec_valid(const struct wayland_surface *parent, const struct yasl_private_popup_spec *spec) { if (!parent || !spec) return false; - if (spec->positioner_explicit && - (spec->anchor_edges > XDG_POSITIONER_ANCHOR_BOTTOM_RIGHT || + if (spec->anchor_edges > XDG_POSITIONER_ANCHOR_BOTTOM_RIGHT || spec->gravity > XDG_POSITIONER_GRAVITY_BOTTOM_RIGHT || (spec->constraints & ~(unsigned)(XDG_POSITIONER_CONSTRAINT_ADJUSTMENT_SLIDE_X | XDG_POSITIONER_CONSTRAINT_ADJUSTMENT_SLIDE_Y | XDG_POSITIONER_CONSTRAINT_ADJUSTMENT_FLIP_X | XDG_POSITIONER_CONSTRAINT_ADJUSTMENT_FLIP_Y | XDG_POSITIONER_CONSTRAINT_ADJUSTMENT_RESIZE_X | - XDG_POSITIONER_CONSTRAINT_ADJUSTMENT_RESIZE_Y)))) + XDG_POSITIONER_CONSTRAINT_ADJUSTMENT_RESIZE_Y))) return false; int64_t x = (int64_t)spec->anchor.x - parent->content.x; int64_t y = (int64_t)spec->anchor.y - parent->content.y; @@ -121,15 +120,9 @@ static struct xdg_positioner *popup_positioner(struct wayland_surface *w, yasl_private_scale_to_logical(at.x, scale), yasl_private_scale_to_logical(at.y, scale), aw > 0 ? aw : 1, ah > 0 ? ah : 1); - uint32_t anchor = spec->positioner_explicit ? spec->anchor_edges : - (spec->beside ? XDG_POSITIONER_ANCHOR_TOP_RIGHT : XDG_POSITIONER_ANCHOR_TOP_LEFT); - uint32_t gravity = spec->positioner_explicit ? spec->gravity : - XDG_POSITIONER_GRAVITY_BOTTOM_RIGHT; - uint32_t constraints = spec->positioner_explicit ? spec->constraints : - XDG_POSITIONER_CONSTRAINT_ADJUSTMENT_FLIP_X | - XDG_POSITIONER_CONSTRAINT_ADJUSTMENT_FLIP_Y | - XDG_POSITIONER_CONSTRAINT_ADJUSTMENT_SLIDE_X | - XDG_POSITIONER_CONSTRAINT_ADJUSTMENT_SLIDE_Y; + uint32_t anchor = spec->anchor_edges; + uint32_t gravity = spec->gravity; + uint32_t constraints = spec->constraints; xdg_positioner_set_anchor(pos, anchor); xdg_positioner_set_gravity(pos, gravity); xdg_positioner_set_constraint_adjustment(pos, constraints); -- cgit v1.2.3