compositor-wayland: Refactor struct wayland_output::name usage
authorSergi Granell <xerpi.g.12@gmail.com>
Fri, 24 Mar 2017 19:48:01 +0000 (20:48 +0100)
committerQuentin Glidic <sardemff7+git@sardemff7.net>
Fri, 24 Mar 2017 19:54:00 +0000 (20:54 +0100)
commit2dcbb8d20d644bebed6307192f21d7c3bcf26845
treeb4a1ce2cd08a1befa9ace3a8d066c26224d83680
parentb4c088630f54f8277690fc4c999a5f315b3cb89e
compositor-wayland: Refactor struct wayland_output::name usage

struct wayland_output::name was used but never initialized.
Also zxdg_toplevel_v6_set_title was only called for windowed outputs,
and some compositors let you see the client's name even when it is
fullscreen (GNOME Shell's Activities menu for example).

So rename struct wayland_output::name to struct wayland_output::title and
precompute it on wayland_output_create_common(), so it can be later used
on xdg's set_title and frame_create.

v2: Move zxdg_toplevel_v6_set_title() before the wl_surface_commit()
as per Quentin Glidic's suggestion.

Signed-off-by: Sergi Granell <xerpi.g.12@gmail.com>
Reviewed-by: Armin Krezović <krezovic.armin@gmail.com>
Reviewed-by: Quentin Glidic <sardemff7+git@sardemff7.net>
libweston/compositor-wayland.c