[PATCH weston] compositor-wayland: Call weston_compositor_exit when receiving an xdg toplevel close event
Armin Krezović
krezovic.armin at gmail.com
Mon Apr 3 18:15:39 UTC 2017
On 25.03.2017 17:19, Sergi Granell wrote:
> Signed-off-by: Sergi Granell <xerpi.g.12 at gmail.com>
> ---
> libweston/compositor-wayland.c | 3 +++
> 1 file changed, 3 insertions(+)
>
> diff --git a/libweston/compositor-wayland.c b/libweston/compositor-wayland.c
> index 1900ab08..a76dd08e 100644
> --- a/libweston/compositor-wayland.c
> +++ b/libweston/compositor-wayland.c
> @@ -1097,6 +1097,9 @@ handle_xdg_toplevel_configure(void *data, struct zxdg_toplevel_v6 *toplevel,
> static void
> handle_xdg_toplevel_close(void *data, struct zxdg_toplevel_v6 *xdg_toplevel)
> {
> + struct wayland_output *output = data;
> +
> + weston_compositor_exit(output->base.compositor);
> }
>
> static const struct zxdg_toplevel_v6_listener xdg_toplevel_listener = {
>
Hi,
My apologies for bursting in so late and after this has been merged.
I don't think this is the desired behaviour. Correct one is to destroy the output / window you
received the event from, and quit when all windows / outputs are gone, since there can be more
than one window (see --output-count).
See X11 backend implementation for similar situation:
https://cgit.freedesktop.org/wayland/weston/tree/libweston/compositor-x11.c#n1056
Thanks, Armin.
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 870 bytes
Desc: OpenPGP digital signature
URL: <https://lists.freedesktop.org/archives/wayland-devel/attachments/20170403/a2e6e98c/attachment.sig>
More information about the wayland-devel
mailing list