mirror of
https://gitlab.freedesktop.org/wayland/wayland.git
synced 2026-03-02 01:41:04 -05:00
Add display event to acknowledge ID deletion
We need to make sure the client doesn't reuse an object ID until the server has seen the destroy request. When a client destroys an ID the server will now respond with the display.delete_id event, which lets the client block reuse until it receives the event.
This commit is contained in:
parent
51f50b8c64
commit
3a1e6df39a
5 changed files with 34 additions and 3 deletions
|
|
@ -314,6 +314,8 @@ wl_resource_destroy(struct wl_resource *resource, uint32_t time)
|
|||
{
|
||||
struct wl_client *client = resource->client;
|
||||
|
||||
wl_resource_post_event(resource->client->display_resource,
|
||||
WL_DISPLAY_DELETE_ID, resource->object.id);
|
||||
wl_map_insert_at(&client->objects, resource->object.id, NULL);
|
||||
destroy_resource(resource, &time);
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue