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 <derek.foreman@collabora.com>
This commit is contained in:
Derek Foreman 2023-03-07 14:45:48 -06:00
parent 640a3c7165
commit ff00ae4218
2 changed files with 5 additions and 4 deletions

View File

@ -1763,7 +1763,7 @@ struct weston_subsurface {
struct {
struct weston_coord_surface offset;
int set;
bool changed;
} position;
int has_cached_data;

View File

@ -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 *