libweston: Send seat name before announcing devices
Clients need to know the seat name at the time they create mouse and keyboard objects. This brings Weston in line with other compositors. The documentation upstream currently is not super clear. It states name is explicitly sent on bind, capabilities don't mention being sent on bind in any way. Signed-off-by: David Edmundson <davidedmundson@kde.org>
This commit is contained in:
parent
312c8bea66
commit
fe64eee3ae
@ -3848,6 +3848,9 @@ bind_seat(struct wl_client *client, void *data, uint32_t version, uint32_t id)
|
|||||||
wl_resource_set_implementation(resource, &seat_interface, data,
|
wl_resource_set_implementation(resource, &seat_interface, data,
|
||||||
unbind_resource);
|
unbind_resource);
|
||||||
|
|
||||||
|
if (version >= WL_SEAT_NAME_SINCE_VERSION)
|
||||||
|
wl_seat_send_name(resource, seat->seat_name);
|
||||||
|
|
||||||
if (weston_seat_get_pointer(seat))
|
if (weston_seat_get_pointer(seat))
|
||||||
caps |= WL_SEAT_CAPABILITY_POINTER;
|
caps |= WL_SEAT_CAPABILITY_POINTER;
|
||||||
if (weston_seat_get_keyboard(seat))
|
if (weston_seat_get_keyboard(seat))
|
||||||
@ -3856,8 +3859,6 @@ bind_seat(struct wl_client *client, void *data, uint32_t version, uint32_t id)
|
|||||||
caps |= WL_SEAT_CAPABILITY_TOUCH;
|
caps |= WL_SEAT_CAPABILITY_TOUCH;
|
||||||
|
|
||||||
wl_seat_send_capabilities(resource, caps);
|
wl_seat_send_capabilities(resource, caps);
|
||||||
if (version >= WL_SEAT_NAME_SINCE_VERSION)
|
|
||||||
wl_seat_send_name(resource, seat->seat_name);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
static void
|
static void
|
||||||
|
Loading…
Reference in New Issue
Block a user