Skip to content
This repository has been archived by the owner on Nov 1, 2021. It is now read-only.

Commit

Permalink
tablet-v2: fix pad and tool object versions
Browse files Browse the repository at this point in the history
These were hardcoded to 1. Instead, create the resource with the
version of the parent object.

(cherry picked from commit ea585db)
  • Loading branch information
emersion committed Jul 7, 2021
1 parent 6d74246 commit 3415e37
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 4 deletions.
5 changes: 3 additions & 2 deletions types/tablet_v2/wlr_tablet_v2_pad.c
Original file line number Diff line number Diff line change
Expand Up @@ -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);
Expand Down
5 changes: 3 additions & 2 deletions types/tablet_v2/wlr_tablet_v2_tool.c
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down

0 comments on commit 3415e37

Please sign in to comment.