From ab909aedac076926ebc5d752c9739cbe6ccf62da Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Kristian=20H=C3=B8gsberg?= Date: Mon, 1 Jan 2001 22:24:24 -0500 Subject: [PATCH] Quit compositor on eject key press. --- wayland-system-compositor.c | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/wayland-system-compositor.c b/wayland-system-compositor.c index d8689102..29d167f4 100644 --- a/wayland-system-compositor.c +++ b/wayland-system-compositor.c @@ -738,12 +738,17 @@ notify_button(struct wlsc_input_device *device, } } +static void on_term_signal(int signal_number, void *data); + void notify_key(struct wlsc_input_device *device, uint32_t key, uint32_t state) { struct wlsc_compositor *ec = device->ec; + if (key == KEY_EJECTCD) + on_term_signal(SIGTERM, ec); + if (!ec->vt_active) return;