aboutsummaryrefslogtreecommitdiffstats
path: root/sway/input/input-manager.c
diff options
context:
space:
mode:
authorLibravatar Ian Fan <ianfan0@gmail.com>2018-07-06 14:13:45 +0100
committerLibravatar Ian Fan <ianfan0@gmail.com>2018-07-06 14:13:45 +0100
commitf63b209d51bab84aacb001adfd443c7f4c9a8cfe (patch)
tree9d6724ce1982ead91cfeb2717b8d5d9e09e017dc /sway/input/input-manager.c
parentMerge pull request #2185 from swaywm/update-wlroots-1076 (diff)
downloadsway-f63b209d51bab84aacb001adfd443c7f4c9a8cfe.tar.gz
sway-f63b209d51bab84aacb001adfd443c7f4c9a8cfe.tar.zst
sway-f63b209d51bab84aacb001adfd443c7f4c9a8cfe.zip
Attach destroy handler earlier
This prevents it from being bypassed when the device has no seat configuration
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 29b47a7b..98f7d7cf 100644
--- a/sway/input/input-manager.c
+++ b/sway/input/input-manager.c
@@ -224,6 +224,9 @@ static void handle_new_input(struct wl_listener *listener, void *data) {
224 input_manager_libinput_config_pointer(input_device); 224 input_manager_libinput_config_pointer(input_device);
225 } 225 }
226 226
227 wl_signal_add(&device->events.destroy, &input_device->device_destroy);
228 input_device->device_destroy.notify = handle_device_destroy;
229
227 struct sway_seat *seat = NULL; 230 struct sway_seat *seat = NULL;
228 if (!input_has_seat_configuration(input)) { 231 if (!input_has_seat_configuration(input)) {
229 wlr_log(L_DEBUG, "no seat configuration, using default seat"); 232 wlr_log(L_DEBUG, "no seat configuration, using default seat");
@@ -260,9 +263,6 @@ static void handle_new_input(struct wl_listener *listener, void *data) {
260 "device '%s' is not configured on any seats", 263 "device '%s' is not configured on any seats",
261 input_device->identifier); 264 input_device->identifier);
262 } 265 }
263
264 wl_signal_add(&device->events.destroy, &input_device->device_destroy);
265 input_device->device_destroy.notify = handle_device_destroy;
266} 266}
267 267
268static void handle_inhibit_activate(struct wl_listener *listener, void *data) { 268static void handle_inhibit_activate(struct wl_listener *listener, void *data) {