summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorKristian Høgsberg <krh@bitplanet.net>2012-10-11 17:12:50 -0400
committerKristian Høgsberg <krh@bitplanet.net>2012-10-11 17:12:50 -0400
commit1849534736dea14b97d9e91cd90e75a8a1e5de9f (patch)
treef3e1f406bc57a267b15eeeef36b81722a99a49a5
parentd4cc1cd098a4e01258aba38f94462cd44eceb1e3 (diff)
client: Discard proxies with no implementation at dispatch timenext
We need to queue up events even if a proxy doesn't have an implementation (listener). In case of server created new objects, the client haven't had a chance to set the listener when the first events to the new object come in. So now we always queue up events and discard them at dispatch time if they don't have a listener at that point.
-rw-r--r--src/wayland-client.c5
1 files changed, 3 insertions, 2 deletions
diff --git a/src/wayland-client.c b/src/wayland-client.c
index 68e6b2e..8ced6cc 100644
--- a/src/wayland-client.c
+++ b/src/wayland-client.c
@@ -491,7 +491,7 @@ queue_event(struct wl_display *display, int len)
if (proxy == WL_ZOMBIE_OBJECT) {
wl_connection_consume(display->connection, size);
return size;
- } else if (proxy == NULL || proxy->object.implementation == NULL) {
+ } else if (proxy == NULL) {
wl_connection_consume(display->connection, size);
return size;
}
@@ -536,7 +536,8 @@ dispatch_event(struct wl_display *display, struct wl_event_queue *queue)
pthread_mutex_unlock(&display->mutex);
- if (proxy != WL_ZOMBIE_OBJECT && ret == 0) {
+ if (proxy != WL_ZOMBIE_OBJECT &&
+ proxy->object.implementation && ret == 0) {
if (wl_debug)
wl_closure_print(closure, &proxy->object, false);