From ff00ae421851bb3c9f7f298e3040e6784d7c7e68 Mon Sep 17 00:00:00 2001 From: Derek Foreman Date: Tue, 7 Mar 2023 14:45:48 -0600 Subject: [PATCH] compositor: Rename position.set to position.changed This is a flag used to track whether the position has changed, not whether the position is set. Signed-off-by: Derek Foreman --- include/libweston/libweston.h | 2 +- libweston/compositor.c | 7 ++++--- 2 files changed, 5 insertions(+), 4 deletions(-) diff --git a/include/libweston/libweston.h b/include/libweston/libweston.h index eabd1634..1c3797d7 100644 --- a/include/libweston/libweston.h +++ b/include/libweston/libweston.h @@ -1763,7 +1763,7 @@ struct weston_subsurface { struct { struct weston_coord_surface offset; - int set; + bool changed; } position; int has_cached_data; diff --git a/libweston/compositor.c b/libweston/compositor.c index 8f077bb4..f5c2e0c4 100644 --- a/libweston/compositor.c +++ b/libweston/compositor.c @@ -4513,13 +4513,14 @@ weston_subsurface_parent_commit(struct weston_subsurface *sub, int parent_is_synchronized) { struct weston_view *view; - if (sub->position.set) { + + if (sub->position.changed) { wl_list_for_each(view, &sub->surface->views, surface_link) weston_view_set_rel_position(view, sub->position.offset.c.x, sub->position.offset.c.y); - sub->position.set = 0; + sub->position.changed = false; } if (parent_is_synchronized || sub->synchronized) @@ -4774,7 +4775,7 @@ subsurface_set_position(struct wl_client *client, return; sub->position.offset = weston_coord_surface(x, y, sub->surface); - sub->position.set = 1; + sub->position.changed = true; } static struct weston_subsurface *