diff options
author | Pekka Paalanen <pekka.paalanen@collabora.co.uk> | 2016-11-15 11:48:42 +0200 |
---|---|---|
committer | Pekka Paalanen <pekka.paalanen@collabora.co.uk> | 2016-11-25 13:12:51 +0200 |
commit | 3326820e0f959778f89c3e62e4a4849ab799519d (patch) | |
tree | bf7548dde892418699ef302bbacf7ba34f74e497 /libweston-desktop | |
parent | a838b7825fa780333f4c9ca0cb61707a9df39748 (diff) |
libweston-desktop/xwayland: clarify 'added' logic
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@collabora.co.uk>
Reviewed-by: Daniel Stone <daniels@collabora.com>
Reviewed-by: Quentin Glidic <sardemff7+git@sardemff7.net>
Diffstat (limited to 'libweston-desktop')
-rw-r--r-- | libweston-desktop/xwayland.c | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/libweston-desktop/xwayland.c b/libweston-desktop/xwayland.c index 62a33899..f7c61e17 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) |