summaryrefslogtreecommitdiff
path: root/sway/input/input-manager.c
diff options
context:
space:
mode:
authorBrian Ashworth <[email protected]>2018-10-18 13:13:40 -0400
committerBrian Ashworth <[email protected]>2018-10-18 13:42:01 -0400
commit2e637b7368de565a85f77fbd03408f33b763dd7b (patch)
tree00f3a082111e02dc2d7e7e54af60db4e58ebfc26 /sway/input/input-manager.c
parent30dbb8eba053fda2e17678feb6cebffc424e1e57 (diff)
cmd_bind{sym,code}: Implement per-device bindings
bindsym --input-device=<identifier> ... bindcode --input-device=<identifier> ...
Diffstat (limited to 'sway/input/input-manager.c')
-rw-r--r--sway/input/input-manager.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/sway/input/input-manager.c b/sway/input/input-manager.c
index 70c2abf7..671f9a47 100644
--- a/sway/input/input-manager.c
+++ b/sway/input/input-manager.c
@@ -45,7 +45,7 @@ struct sway_seat *input_manager_get_seat(
return seat_create(input, seat_name);
}
-static char *get_device_identifier(struct wlr_input_device *device) {
+char *input_device_get_identifier(struct wlr_input_device *device) {
int vendor = device->vendor;
int product = device->product;
char *name = strdup(device->name);
@@ -278,7 +278,7 @@ static void handle_new_input(struct wl_listener *listener, void *data) {
device->data = input_device;
input_device->wlr_device = device;
- input_device->identifier = get_device_identifier(device);
+ input_device->identifier = input_device_get_identifier(device);
wl_list_insert(&input->devices, &input_device->link);
wlr_log(WLR_DEBUG, "adding device: '%s'",
@@ -375,7 +375,7 @@ void handle_virtual_keyboard(struct wl_listener *listener, void *data) {
device->data = input_device;
input_device->wlr_device = device;
- input_device->identifier = get_device_identifier(device);
+ input_device->identifier = input_device_get_identifier(device);
wl_list_insert(&input_manager->devices, &input_device->link);
wlr_log(WLR_DEBUG, "adding virtual keyboard: '%s'",