aboutsummaryrefslogtreecommitdiff
path: root/sway
diff options
context:
space:
mode:
authorTony Crisci <tony@dubstepdish.com>2017-12-16 13:16:58 -0500
committerTony Crisci <tony@dubstepdish.com>2017-12-16 13:16:58 -0500
commitb0ed1ad28d8c87a9ca0e5eacb1e7b840ed924117 (patch)
treee8cea5cfeea200767111bf5de4f3355aec41169c /sway
parent24e240642984a3b7ee2fba0828eb4375e901aafc (diff)
downloadsway-b0ed1ad28d8c87a9ca0e5eacb1e7b840ed924117.tar.xz
device add/remove logging
Diffstat (limited to 'sway')
-rw-r--r--sway/input/input-manager.c6
-rw-r--r--sway/input/seat.c7
2 files changed, 12 insertions, 1 deletions
diff --git a/sway/input/input-manager.c b/sway/input/input-manager.c
index e4558366..34766ee6 100644
--- a/sway/input/input-manager.c
+++ b/sway/input/input-manager.c
@@ -120,6 +120,9 @@ static void input_add_notify(struct wl_listener *listener, void *data) {
input_device->identifier = get_device_identifier(device);
wl_list_insert(&input->devices, &input_device->link);
+ sway_log(L_DEBUG, "adding device: '%s'",
+ input_device->identifier);
+
// find config
for (int i = 0; i < config->input_configs->length; ++i) {
struct input_config *input_config = config->input_configs->items[i];
@@ -157,6 +160,9 @@ static void input_remove_notify(struct wl_listener *listener, void *data) {
return;
}
+ sway_log(L_DEBUG, "removing device: '%s'",
+ input_device->identifier);
+
struct sway_seat *seat = NULL;
wl_list_for_each(seat, &input->seats, link) {
sway_seat_remove_device(seat, input_device);
diff --git a/sway/input/seat.c b/sway/input/seat.c
index 907c610a..1e62efa1 100644
--- a/sway/input/seat.c
+++ b/sway/input/seat.c
@@ -125,6 +125,9 @@ void sway_seat_add_device(struct sway_seat *seat,
return;
}
+ sway_log(L_DEBUG, "adding device %s to seat %s",
+ input_device->identifier, seat->wlr_seat->name);
+
seat_device->sway_seat = seat;
seat_device->input_device = input_device;
wl_list_insert(&seat->devices, &seat_device->link);
@@ -134,7 +137,6 @@ void sway_seat_add_device(struct sway_seat *seat,
void sway_seat_remove_device(struct sway_seat *seat,
struct sway_input_device *input_device) {
- sway_log(L_DEBUG, "input remove: %s", input_device->identifier);
struct sway_seat_device *seat_device =
sway_seat_get_device(seat, input_device);
@@ -142,6 +144,9 @@ void sway_seat_remove_device(struct sway_seat *seat,
return;
}
+ sway_log(L_DEBUG, "removing device %s from seat %s",
+ input_device->identifier, seat->wlr_seat->name);
+
seat_device_destroy(seat_device);
}