[PATCH weston 4/6] libweston-desktop/xwayland: clarify 'added' logic
Quentin Glidic
sardemff7+wayland at sardemff7.net
Thu Nov 24 15:21:21 UTC 2016
On 24/11/2016 12:40, Pekka Paalanen wrote:
> From: Pekka Paalanen <pekka.paalanen at collabora.co.uk>
>
> Setting to a constant is much easier to read and grep for than setting to
> a computed variable.
>
> There are no functional changes.
>
> Signed-off-by: Pekka Paalanen <pekka.paalanen at collabora.co.uk>
It was clear to me at least. ;-)
Anyway:
Reviewed-by: Quentin Glidic <sardemff7+git at sardemff7.net>
Cheers,
> ---
> libweston-desktop/xwayland.c | 3 ++-
> 1 file changed, 2 insertions(+), 1 deletion(-)
>
> diff --git a/libweston-desktop/xwayland.c b/libweston-desktop/xwayland.c
> index 0c4ff2b..f0cd1ed 100644
> --- a/libweston-desktop/xwayland.c
> +++ b/libweston-desktop/xwayland.c
> @@ -92,9 +92,11 @@ weston_desktop_xwayland_surface_change_state(struct weston_desktop_xwayland_surf
> weston_desktop_surface_unset_relative_to(surface->surface);
> weston_desktop_api_surface_added(surface->desktop,
> surface->surface);
> + surface->added = true;
> } else if (surface->added) {
> weston_desktop_api_surface_removed(surface->desktop,
> surface->surface);
> + surface->added = false;
> }
>
> if (state == XWAYLAND) {
> @@ -106,7 +108,6 @@ weston_desktop_xwayland_surface_change_state(struct weston_desktop_xwayland_surf
> }
>
> surface->state = state;
> - surface->added = to_add;
> }
>
> if (parent != NULL)
>
--
Quentin “Sardem FF7” Glidic
More information about the wayland-devel
mailing list