summaryrefslogtreecommitdiff
path: root/src/platform/wayland/popup.c
diff options
context:
space:
mode:
authorBerke Güzel <berke.guzel@gdh.digital>2026-10-14 09:38:31 +0300
committerBerke Güzel <berke.guzel@gdh.digital>2026-10-14 09:38:31 +0300
commit5ef6ca21ab9e1cf4f69254234d190a634b777d52 (patch)
tree974d3797a6d9487e54a811e224bf78a3f52dda85 /src/platform/wayland/popup.c
parent563b23a33726289387193b85d90fb569631ee05f (diff)
Remove deprecated Cocoa OpenGL and private compatibility APIs
Diffstat (limited to 'src/platform/wayland/popup.c')
-rw-r--r--src/platform/wayland/popup.c17
1 files changed, 5 insertions, 12 deletions
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);