diff options
author | Simon Ser <contact@emersion.fr> | 2021-07-01 10:16:26 +0200 |
---|---|---|
committer | Simon Zeni <simon@bl4ckb0ne.ca> | 2021-07-01 10:52:58 -0400 |
commit | ea585dba0f69ab2c5010e60646465df56202ee4b (patch) | |
tree | dda52e72ac04bdf931d61684a8cab2f6dab8965e | |
parent | 57b70a478cafcba37a608b71b7f88e61a8564ed7 (diff) |
tablet-v2: fix pad and tool object versions
These were hardcoded to 1. Instead, create the resource with the
version of the parent object.
-rw-r--r-- | types/tablet_v2/wlr_tablet_v2_pad.c | 5 | ||||
-rw-r--r-- | types/tablet_v2/wlr_tablet_v2_tool.c | 5 |
2 files changed, 6 insertions, 4 deletions
diff --git a/types/tablet_v2/wlr_tablet_v2_pad.c b/types/tablet_v2/wlr_tablet_v2_pad.c index e961dc3e..5edacb13 100644 --- a/types/tablet_v2/wlr_tablet_v2_pad.c +++ b/types/tablet_v2/wlr_tablet_v2_pad.c @@ -306,8 +306,9 @@ void add_tablet_pad_client(struct wlr_tablet_seat_client_v2 *seat, return; } - client->resource = - wl_resource_create(seat->wl_client, &zwp_tablet_pad_v2_interface, 1, 0); + uint32_t version = wl_resource_get_version(seat->resource); + client->resource = wl_resource_create(seat->wl_client, + &zwp_tablet_pad_v2_interface, version, 0); if (!client->resource) { wl_client_post_no_memory(seat->wl_client); free(client->groups); diff --git a/types/tablet_v2/wlr_tablet_v2_tool.c b/types/tablet_v2/wlr_tablet_v2_tool.c index 5ef19be8..51efc1e8 100644 --- a/types/tablet_v2/wlr_tablet_v2_tool.c +++ b/types/tablet_v2/wlr_tablet_v2_tool.c @@ -115,8 +115,9 @@ void add_tablet_tool_client(struct wlr_tablet_seat_client_v2 *seat, client->tool = tool; client->seat = seat; - client->resource = - wl_resource_create(seat->wl_client, &zwp_tablet_tool_v2_interface, 1, 0); + uint32_t version = wl_resource_get_version(seat->resource); + client->resource = wl_resource_create(seat->wl_client, + &zwp_tablet_tool_v2_interface, version, 0); if (!client->resource) { free(client); return; |