diff options
author | Brian Ashworth <[email protected]> | 2019-07-17 17:12:20 -0400 |
---|---|---|
committer | Simon Ser <[email protected]> | 2019-07-23 20:45:46 +0300 |
commit | 6effca7b61e87c7d17885d007d94e556a0137651 (patch) | |
tree | 686cc1e219d8236f8c9864c9992b3cb6b44c9583 /sway/input/input-manager.c | |
parent | 36aa67e549609ce6c786c382f14ab866536cac47 (diff) |
ipc: add an input event
This adds an ipc event related to input devices. Currently the
following changes are supported:
- added: when an input device becomes available
- removed: when an input device is no longer available
- xkb_keymap_changed: (keyboards only) the keymap changed
- xkb_layout_changed: (keyboards only) the effective layout changed
Diffstat (limited to 'sway/input/input-manager.c')
-rw-r--r-- | sway/input/input-manager.c | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/sway/input/input-manager.c b/sway/input/input-manager.c index 4fd980c4..dd84a0b3 100644 --- a/sway/input/input-manager.c +++ b/sway/input/input-manager.c @@ -12,6 +12,7 @@ #include "sway/config.h" #include "sway/input/input-manager.h" #include "sway/input/seat.h" +#include "sway/ipc-server.h" #include "sway/server.h" #include "stringop.h" #include "list.h" @@ -584,6 +585,8 @@ static void handle_device_destroy(struct wl_listener *listener, void *data) { seat_remove_device(seat, input_device); } + ipc_event_input("removed", input_device); + wl_list_remove(&input_device->link); wl_list_remove(&input_device->device_destroy.link); free(input_device->identifier); @@ -656,6 +659,8 @@ static void handle_new_input(struct wl_listener *listener, void *data) { "device '%s' is not configured on any seats", input_device->identifier); } + + ipc_event_input("added", input_device); } static void handle_inhibit_activate(struct wl_listener *listener, void *data) { |