diff options
author | Ian Fan <ianfan0@gmail.com> | 2018-07-06 14:13:45 +0100 |
---|---|---|
committer | Ian Fan <ianfan0@gmail.com> | 2018-07-06 14:13:45 +0100 |
commit | f63b209d51bab84aacb001adfd443c7f4c9a8cfe (patch) | |
tree | 9d6724ce1982ead91cfeb2717b8d5d9e09e017dc /sway/input/input-manager.c | |
parent | 84109431f7d7919789839716d53346290b51d0f7 (diff) |
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.c | 6 |
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) { input_manager_libinput_config_pointer(input_device); } + wl_signal_add(&device->events.destroy, &input_device->device_destroy); + input_device->device_destroy.notify = handle_device_destroy; + struct sway_seat *seat = NULL; if (!input_has_seat_configuration(input)) { 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) { "device '%s' is not configured on any seats", input_device->identifier); } - - wl_signal_add(&device->events.destroy, &input_device->device_destroy); - input_device->device_destroy.notify = handle_device_destroy; } static void handle_inhibit_activate(struct wl_listener *listener, void *data) { |