From 25a025c6fb0d6149f4a43d5aba04bcdb4ab40b9a Mon Sep 17 00:00:00 2001 From: Dominique Martinet Date: Fri, 28 Oct 2022 21:10:27 +0900 Subject: [PATCH] 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. --- seat.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/seat.c b/seat.c index c87ac98..39d8f0b 100644 --- a/seat.c +++ b/seat.c @@ -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