diff options
author | Tony Crisci <tony@dubstepdish.com> | 2017-12-12 10:55:20 -0500 |
---|---|---|
committer | Tony Crisci <tony@dubstepdish.com> | 2017-12-12 10:55:20 -0500 |
commit | c173d30b9203520c274f34eb72fc787aa33ca211 (patch) | |
tree | 11a1090e2e582caf1c19521596925ed14e57a6e4 /sway/input | |
parent | config cleanup (diff) | |
download | sway-c173d30b9203520c274f34eb72fc787aa33ca211.tar.gz sway-c173d30b9203520c274f34eb72fc787aa33ca211.tar.zst sway-c173d30b9203520c274f34eb72fc787aa33ca211.zip |
seat configuration
Diffstat (limited to 'sway/input')
-rw-r--r-- | sway/input/input-manager.c | 11 |
1 files changed, 7 insertions, 4 deletions
diff --git a/sway/input/input-manager.c b/sway/input/input-manager.c index b7f5615c..b07a733e 100644 --- a/sway/input/input-manager.c +++ b/sway/input/input-manager.c | |||
@@ -104,7 +104,9 @@ static void input_add_notify(struct wl_listener *listener, void *data) { | |||
104 | } | 104 | } |
105 | } | 105 | } |
106 | 106 | ||
107 | struct sway_seat *seat = input_manager_get_seat(input, default_seat); | 107 | const char *seat_name = |
108 | (sway_device->config ? sway_device->config->seat : default_seat); | ||
109 | struct sway_seat *seat = input_manager_get_seat(input, seat_name); | ||
108 | sway_seat_add_device(seat, sway_device); | 110 | sway_seat_add_device(seat, sway_device); |
109 | } | 111 | } |
110 | 112 | ||
@@ -176,9 +178,9 @@ void sway_input_manager_set_focus(struct sway_input_manager *input, | |||
176 | } | 178 | } |
177 | 179 | ||
178 | void sway_input_manager_apply_config(struct sway_input_manager *input, | 180 | void sway_input_manager_apply_config(struct sway_input_manager *input, |
179 | struct input_config *config) { | 181 | struct input_config *input_config) { |
180 | struct sway_input_device *sway_device = | 182 | struct sway_input_device *sway_device = |
181 | input_sway_device_from_config(input, config); | 183 | input_sway_device_from_config(input, input_config); |
182 | if (!sway_device) { | 184 | if (!sway_device) { |
183 | return; | 185 | return; |
184 | } | 186 | } |
@@ -188,7 +190,8 @@ void sway_input_manager_apply_config(struct sway_input_manager *input, | |||
188 | sway_seat_remove_device(seat, sway_device); | 190 | sway_seat_remove_device(seat, sway_device); |
189 | } | 191 | } |
190 | 192 | ||
191 | seat = input_manager_get_seat(input, default_seat); | 193 | const char *seat_name = (input_config->seat ? input_config->seat : default_seat); |
194 | seat = input_manager_get_seat(input, seat_name); | ||
192 | sway_seat_add_device(seat, sway_device); | 195 | sway_seat_add_device(seat, sway_device); |
193 | } | 196 | } |
194 | 197 | ||