mirror of
https://gitlab.freedesktop.org/wayland/wayland.git
synced 2025-10-29 05:40:16 -04:00
client: Discard proxies with no implementation at dispatch time
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.
This commit is contained in:
parent
d4cc1cd098
commit
1849534736
1 changed files with 3 additions and 2 deletions
|
|
@ -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);
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue