Skip to content
Snippets Groups Projects
Commit 6c7a1c7b authored by Pekka Paalanen's avatar Pekka Paalanen
Browse files

ivi-shell: add exit binding


Let's me easily exit ivi-shell when testing with the DRM-backend.
Only available in ivi-shell developer mode.

Signed-off-by: Pekka Paalanen's avatarPekka Paalanen <pekka.paalanen@collabora.co.uk>
Acked-by: default avatarNobuhiko Tanibata <NOBUHIKO_TANIBATA@xddp.denso.co.jp>
Reviewed-by: Daniel Stone's avatarDaniel Stone <daniels@collabora.com>
parent e35b2233
No related branches found
No related tags found
No related merge requests found
......@@ -36,6 +36,7 @@
#include <dlfcn.h>
#include <limits.h>
#include <assert.h>
#include <linux/input.h>
#include "ivi-shell.h"
#include "ivi-application-server-protocol.h"
......@@ -354,6 +355,15 @@ shell_destroy(struct wl_listener *listener, void *data)
free(shell);
}
static void
terminate_binding(struct weston_seat *seat, uint32_t time, uint32_t key,
void *data)
{
struct weston_compositor *compositor = data;
wl_display_terminate(compositor->wl_display);
}
static void
init_ivi_shell(struct weston_compositor *compositor, struct ivi_shell *shell,
const struct ivi_shell_setting *setting)
......@@ -364,8 +374,14 @@ init_ivi_shell(struct weston_compositor *compositor, struct ivi_shell *shell,
weston_layer_init(&shell->input_panel_layer, NULL);
if (setting->developermode)
if (setting->developermode) {
weston_install_debug_key_binding(compositor, MODIFIER_SUPER);
weston_compositor_add_key_binding(compositor, KEY_BACKSPACE,
MODIFIER_CTRL | MODIFIER_ALT,
terminate_binding,
compositor);
}
}
static int
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment