mirror of
https://gitlab.freedesktop.org/wayland/weston.git
synced 2026-05-08 03:08:05 +02:00
compositor: Track DIRTY_POS properly
For clients using old protocol versions, the WESTON_SURFACE_DIRTY_POS bit currently gets set on any attachment. It should really only be set if the attachment is non-zero. Since it's possible to attach mulitple times, or to invoke wl_surface.offset multiple times, let's allow clearing the bit so it stays up to date with the state that will actually be used on commmit(). Currently, this is pointlessly pedantic, as we don't really do much with the bit, but in a future commit I intend to use it to notice states that may change visibility/occlusion status of a surface. Signed-off-by: Derek Foreman <derek.foreman@collabora.com>
This commit is contained in:
parent
eac3d78bc6
commit
439aea0188
1 changed files with 8 additions and 2 deletions
|
|
@ -4426,7 +4426,10 @@ surface_attach(struct wl_client *client,
|
|||
return;
|
||||
}
|
||||
} else {
|
||||
surface->pending.status |= WESTON_SURFACE_DIRTY_POS;
|
||||
if (sx != 0 || sy != 0)
|
||||
surface->pending.status |= WESTON_SURFACE_DIRTY_POS;
|
||||
else
|
||||
surface->pending.status &= ~WESTON_SURFACE_DIRTY_POS;
|
||||
surface->pending.buf_offset = weston_coord_surface(sx, sy,
|
||||
surface);
|
||||
}
|
||||
|
|
@ -4790,7 +4793,10 @@ surface_offset(struct wl_client *client,
|
|||
return;
|
||||
}
|
||||
|
||||
surface->pending.status |= WESTON_SURFACE_DIRTY_POS;
|
||||
if (sx != 0 || sy != 0)
|
||||
surface->pending.status |= WESTON_SURFACE_DIRTY_POS;
|
||||
else
|
||||
surface->pending.status &= ~WESTON_SURFACE_DIRTY_POS;
|
||||
surface->pending.buf_offset = weston_coord_surface(sx, sy, surface);
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue