summaryrefslogtreecommitdiff
path: root/sway/input/input-manager.c
diff options
context:
space:
mode:
authorTony Crisci <[email protected]>2017-12-20 06:12:08 -0500
committerTony Crisci <[email protected]>2017-12-20 06:12:08 -0500
commit63f7fb95172a72436698a1562b4f7ea1e9100a7e (patch)
tree7b1191368f446c7ee24ce41eb36d0cd3a86a6c35 /sway/input/input-manager.c
parenta4c1270ef0a3c5bd610b13867be7616a55e59dc5 (diff)
cleanup
Diffstat (limited to 'sway/input/input-manager.c')
-rw-r--r--sway/input/input-manager.c9
1 files changed, 5 insertions, 4 deletions
diff --git a/sway/input/input-manager.c b/sway/input/input-manager.c
index b20b7b7e..4459c43b 100644
--- a/sway/input/input-manager.c
+++ b/sway/input/input-manager.c
@@ -119,10 +119,11 @@ static void input_add_notify(struct wl_listener *listener, void *data) {
bool added = false;
wl_list_for_each(seat, &input->seats, link) {
- if (seat->config &&
- (seat_config_get_attachment(seat->config,
- input_device->identifier) ||
- seat_config_get_attachment(seat->config, "*"))) {
+ bool has_attachment = seat->config &&
+ (seat_config_get_attachment(seat->config, input_device->identifier) ||
+ seat_config_get_attachment(seat->config, "*"));
+
+ if (has_attachment) {
sway_seat_add_device(seat, input_device);
added = true;
}