From d0d1b31c102761b1f31fb4551f31c4498f8b9209 Mon Sep 17 00:00:00 2001 From: Quantum Date: Tue, 26 Jan 2021 23:28:07 -0500 Subject: [PATCH] [client] wayland: add handling for close event When the xdg_toplevel receives a close event, call app_handleCloseEvent. --- client/displayservers/Wayland/wayland.c | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/client/displayservers/Wayland/wayland.c b/client/displayservers/Wayland/wayland.c index 4faab9d4..c96f1d04 100644 --- a/client/displayservers/Wayland/wayland.c +++ b/client/displayservers/Wayland/wayland.c @@ -448,8 +448,14 @@ static void xdgToplevelConfigure(void * data, struct xdg_toplevel * xdgToplevel, } } +static void xdgToplevelClose(void * data, struct xdg_toplevel * xdgToplevel) +{ + app_handleCloseEvent(); +} + static const struct xdg_toplevel_listener xdgToplevelListener = { .configure = xdgToplevelConfigure, + .close = xdgToplevelClose, }; static bool waylandEarlyInit(void)