mirror of
https://gitlab.freedesktop.org/wayland/wayland.git
synced 2025-10-31 22:25:25 -04: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
|
|
@ -587,9 +587,14 @@ wl_connection_demarshal(struct wl_connection *connection,
|
|||
closure->args[i] = object;
|
||||
|
||||
*object = wl_map_lookup(objects, *p);
|
||||
if (*object == NULL && *p != 0) {
|
||||
if (*object == WL_ZOMBIE_OBJECT) {
|
||||
/* references object we've already
|
||||
* destroyed client side */
|
||||
*object = NULL;
|
||||
} else if (*object == NULL && *p != 0) {
|
||||
printf("unknown object (%d), message %s(%s)\n",
|
||||
*p, message->name, message->signature);
|
||||
*object = NULL;
|
||||
errno = EINVAL;
|
||||
goto err;
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue