diff options
author | emersion <contact@emersion.fr> | 2018-07-06 14:37:52 +0100 |
---|---|---|
committer | GitHub <noreply@github.com> | 2018-07-06 14:37:52 +0100 |
commit | b8ee88344a5e2869fd3ce04762eda305dc5bf62e (patch) | |
tree | a645930a9b105185a5f2dbddbe8ca8acf50a4559 | |
parent | Merge pull request #2217 from RedSoxFan/fix-663 (diff) | |
parent | Merge branch 'master' into remove-input-fix (diff) | |
download | sway-b8ee88344a5e2869fd3ce04762eda305dc5bf62e.tar.gz sway-b8ee88344a5e2869fd3ce04762eda305dc5bf62e.tar.zst sway-b8ee88344a5e2869fd3ce04762eda305dc5bf62e.zip |
Merge pull request #2220 from ianyfan/remove-input-fix
Attach destroy handler earlier for input devices
-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) { | |||
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 | ||
268 | static void handle_inhibit_activate(struct wl_listener *listener, void *data) { | 268 | static void handle_inhibit_activate(struct wl_listener *listener, void *data) { |