From d28bc023933a25047b487da80175a29d35ec4b93 Mon Sep 17 00:00:00 2001 From: llyyr Date: Wed, 13 May 2026 03:12:28 +0530 Subject: [PATCH] wayland: convert check_for_resize to bool Only returns if a resize edge was found --- video/out/wayland_common.c | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/video/out/wayland_common.c b/video/out/wayland_common.c index 2e86cb76f9..9575fc375b 100644 --- a/video/out/wayland_common.c +++ b/video/out/wayland_common.c @@ -309,7 +309,7 @@ struct vo_wayland_preferred_description_info { static bool single_output_spanned(struct vo_wayland_state *wl); -static int check_for_resize(struct vo_wayland_state *wl, int edge_pixels, +static bool check_for_resize(struct vo_wayland_state *wl, int edge_pixels, enum xdg_toplevel_resize_edge *edges); static int get_mods(struct vo_wayland_seat *seat); static int handle_round(int scale, int n); @@ -3108,11 +3108,11 @@ static void check_fd(struct vo_wayland_state *wl, struct vo_wayland_data_offer * } } -static int check_for_resize(struct vo_wayland_state *wl, int edge_pixels, +static bool check_for_resize(struct vo_wayland_state *wl, int edge_pixels, enum xdg_toplevel_resize_edge *edges) { if (wl->opts->fullscreen || wl->opts->window_maximized) - return 0; + return false; int pos[2] = { wl->mouse_x, wl->mouse_y }; *edges = 0; @@ -3127,7 +3127,7 @@ static int check_for_resize(struct vo_wayland_state *wl, int edge_pixels, if (pos[1] >= (mp_rect_h(wl->geometry) - edge_pixels)) *edges |= XDG_TOPLEVEL_RESIZE_EDGE_BOTTOM; - return *edges; + return *edges != 0; } static void clean_feedback_pool(struct vo_wayland_feedback_pool *fback_pool)