diff --git a/tools/libinput-debug-events.c b/tools/libinput-debug-events.c index 8ca2c542..ce0f2d63 100644 --- a/tools/libinput-debug-events.c +++ b/tools/libinput-debug-events.c @@ -782,11 +782,13 @@ handle_and_print_events(struct libinput *li) case LIBINPUT_EVENT_NONE: abort(); case LIBINPUT_EVENT_DEVICE_ADDED: - case LIBINPUT_EVENT_DEVICE_REMOVED: print_device_notify(ev); tools_device_apply_config(libinput_event_get_device(ev), &options); break; + case LIBINPUT_EVENT_DEVICE_REMOVED: + print_device_notify(ev); + break; case LIBINPUT_EVENT_KEYBOARD_KEY: print_key_event(li, ev); break; diff --git a/tools/libinput-debug-gui.c b/tools/libinput-debug-gui.c index b9139fa1..bb01ebc3 100644 --- a/tools/libinput-debug-gui.c +++ b/tools/libinput-debug-gui.c @@ -820,6 +820,8 @@ handle_event_device_notify(struct libinput_event *ev) if (libinput_event_get_type(ev) == LIBINPUT_EVENT_DEVICE_ADDED) { type = "added"; register_evdev_device(w, dev); + tools_device_apply_config(libinput_event_get_device(ev), + &w->options); } else { type = "removed"; unregister_evdev_device(w, dev); @@ -830,9 +832,6 @@ handle_event_device_notify(struct libinput_event *ev) libinput_device_get_name(dev), type); - tools_device_apply_config(libinput_event_get_device(ev), - &w->options); - if (libinput_event_get_type(ev) == LIBINPUT_EVENT_DEVICE_ADDED) { for (i = 0; i < ARRAY_LENGTH(w->devices); i++) { if (w->devices[i] == NULL) {