mirror of
https://gitlab.freedesktop.org/wayland/wayland.git
synced 2025-11-08 13:29:47 -05:00
Quit compositor on eject key press.
This commit is contained in:
parent
fdec236609
commit
ab909aedac
1 changed files with 5 additions and 0 deletions
|
|
@ -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;
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue