From 8224309f14e072d71c5d6f86905ddb8fe410d012 Mon Sep 17 00:00:00 2001 From: Emilio Pozuelo Monfort Date: Tue, 19 Nov 2013 11:37:17 +0100 Subject: [PATCH] exposay: add cancel impl to the kbd grab iface Otherwise we'll crash when cancel is called. Signed-off-by: Emilio Pozuelo Monfort --- src/shell.c | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/src/shell.c b/src/shell.c index 2a8c04cce..dae31a0dd 100644 --- a/src/shell.c +++ b/src/shell.c @@ -5351,9 +5351,19 @@ exposay_modifier(struct weston_keyboard_grab *grab, uint32_t serial, { } +static void +exposay_cancel(struct weston_keyboard_grab *grab) +{ + struct desktop_shell *shell = + container_of(grab, struct desktop_shell, exposay.grab_kbd); + + exposay_set_state(shell, EXPOSAY_TARGET_CANCEL, shell->exposay.seat); +} + static const struct weston_keyboard_grab_interface exposay_kbd_grab = { exposay_key, exposay_modifier, + exposay_cancel, }; /**