mirror of
https://github.com/hyprwm/wlroots-hyprland.git
synced 2024-12-22 09:59:48 +01:00
tablet-v2: only send id event is vendor is set
Some tablets may not have a USB vendor/product set. References: https://gitlab.freedesktop.org/wayland/wayland-protocols/-/issues/180#note_2303637
This commit is contained in:
parent
ee70932422
commit
091c6e09b1
1 changed files with 4 additions and 3 deletions
|
@ -102,13 +102,14 @@ void add_tablet_client(struct wlr_tablet_seat_client_v2 *seat,
|
|||
client, destroy_tablet_v2);
|
||||
zwp_tablet_seat_v2_send_tablet_added(seat->resource, client->resource);
|
||||
|
||||
// Send the expected events
|
||||
if (tablet->wlr_tablet->base.name) {
|
||||
zwp_tablet_v2_send_name(client->resource,
|
||||
tablet->wlr_tablet->base.name);
|
||||
}
|
||||
zwp_tablet_v2_send_id(client->resource,
|
||||
tablet->wlr_device->vendor, tablet->wlr_device->product);
|
||||
if (tablet->wlr_device->vendor != 0) {
|
||||
zwp_tablet_v2_send_id(client->resource,
|
||||
tablet->wlr_device->vendor, tablet->wlr_device->product);
|
||||
}
|
||||
|
||||
const char **path_ptr;
|
||||
wl_array_for_each(path_ptr, &tablet->wlr_tablet->paths) {
|
||||
|
|
Loading…
Reference in a new issue