From 1e097b0e1d4288d16f518d69712671fdab10499e Mon Sep 17 00:00:00 2001 From: Sunderland93 Date: Wed, 28 Nov 2018 13:58:14 +0400 Subject: [PATCH] Implement xdg_toplevel_close event --- gfx/drivers_context/wayland_ctx.c | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/gfx/drivers_context/wayland_ctx.c b/gfx/drivers_context/wayland_ctx.c index ac083651a1..d243a615ba 100644 --- a/gfx/drivers_context/wayland_ctx.c +++ b/gfx/drivers_context/wayland_ctx.c @@ -580,9 +580,15 @@ static void handle_toplevel_config(void *data, struct xdg_toplevel *toplevel, wl->configured = false; } -/* TODO: implement xdg_toplevel close */ +static void handle_toplevel_close(void *data, struct xdg_toplevel *xdg_toplevel) +{ + gfx_ctx_wayland_data_t *wl = (gfx_ctx_wayland_data_t*)data; + BIT_SET(wl->input.key_state, KEY_ESC); +} + static const struct xdg_toplevel_listener xdg_toplevel_listener = { handle_toplevel_config, + handle_toplevel_close, }; static void display_handle_geometry(void *data,