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>
This commit is contained in:
@@ -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_surface_unset_relative_to(surface->surface);
|
||||||
weston_desktop_api_surface_added(surface->desktop,
|
weston_desktop_api_surface_added(surface->desktop,
|
||||||
surface->surface);
|
surface->surface);
|
||||||
|
surface->added = true;
|
||||||
} else if (surface->added) {
|
} else if (surface->added) {
|
||||||
weston_desktop_api_surface_removed(surface->desktop,
|
weston_desktop_api_surface_removed(surface->desktop,
|
||||||
surface->surface);
|
surface->surface);
|
||||||
|
surface->added = false;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (state == XWAYLAND) {
|
if (state == XWAYLAND) {
|
||||||
@@ -106,7 +108,6 @@ weston_desktop_xwayland_surface_change_state(struct weston_desktop_xwayland_surf
|
|||||||
}
|
}
|
||||||
|
|
||||||
surface->state = state;
|
surface->state = state;
|
||||||
surface->added = to_add;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
if (parent != NULL)
|
if (parent != NULL)
|
||||||
|
|||||||
Reference in New Issue
Block a user