summaryrefslogtreecommitdiff
path: root/src/connection.c
diff options
context:
space:
mode:
authorKristian Høgsberg <krh@bitplanet.net>2011-11-15 22:20:28 -0500
committerKristian Høgsberg <krh@bitplanet.net>2011-11-17 17:37:52 -0500
commit3a1e6df39aa34df53c97ce9c7a1bfddf5a97faf3 (patch)
tree5c103308f52da243bf3cb831ef26736bb760f887 /src/connection.c
parent51f50b8c6425684214e58a0e5ab2515b624feaad (diff)
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.
Diffstat (limited to 'src/connection.c')
-rw-r--r--src/connection.c7
1 files changed, 6 insertions, 1 deletions
diff --git a/src/connection.c b/src/connection.c
index a10508d..4230f7d 100644
--- a/src/connection.c
+++ b/src/connection.c
@@ -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;
}