virtual pointers/keyboard: update capabilities after adding device

In headless case there will not be anyone else to call
update_capabilities(), so we must make sure they're called after we add
new devices that could... add capabilities.

Just inconditionally call it like other pointer/keyboard add handlers.
This commit is contained in:
Dominique Martinet 2022-10-28 21:10:27 +09:00
parent 265d8782c9
commit 25a025c6fb

2
seat.c
View file

@ -226,6 +226,7 @@ handle_virtual_pointer(struct wl_listener *listener, void *data)
device->output_name = strdup(event->suggested_output->name);
/* event->suggested_seat should be checked if we handle multiple seats */
handle_new_pointer(seat, device);
update_capabilities(seat);
}
static void
@ -408,6 +409,7 @@ handle_virtual_keyboard(struct wl_listener *listener, void *data)
* to select the appropriate one */
handle_new_keyboard(seat, device, true);
update_capabilities(seat);
}
static void