exposay: add cancel impl to the kbd grab iface
authorEmilio Pozuelo Monfort <pochu27@gmail.com>
Tue, 19 Nov 2013 10:37:17 +0000 (11:37 +0100)
committerKristian Høgsberg <krh@bitplanet.net>
Tue, 19 Nov 2013 19:51:26 +0000 (11:51 -0800)
Otherwise we'll crash when cancel is called.

Signed-off-by: Emilio Pozuelo Monfort <emilio.pozuelo@collabora.co.uk>
src/shell.c

index 2a8c04c..dae31a0 100644 (file)
@@ -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,
 };
 
 /**