mirror of
https://gitlab.freedesktop.org/wayland/wayland.git
synced 2025-11-01 22:58:40 -04:00
Return the closure from wl_connection_vmarshal()
And provide a function to write it to a connection.
This commit is contained in:
parent
50038e4757
commit
6bce89da78
4 changed files with 35 additions and 13 deletions
|
|
@ -79,6 +79,7 @@ WL_EXPORT void
|
|||
wl_client_post_event(struct wl_client *client, struct wl_object *sender,
|
||||
uint32_t opcode, ...)
|
||||
{
|
||||
struct wl_closure *closure;
|
||||
va_list ap;
|
||||
|
||||
if (client == NULL)
|
||||
|
|
@ -86,10 +87,13 @@ wl_client_post_event(struct wl_client *client, struct wl_object *sender,
|
|||
return;
|
||||
|
||||
va_start(ap, opcode);
|
||||
wl_connection_vmarshal(client->connection,
|
||||
sender, opcode, ap,
|
||||
&sender->interface->events[opcode]);
|
||||
closure = wl_connection_vmarshal(client->connection,
|
||||
sender, opcode, ap,
|
||||
&sender->interface->events[opcode]);
|
||||
va_end(ap);
|
||||
|
||||
wl_closure_send(closure, client->connection);
|
||||
wl_closure_destroy(closure);
|
||||
}
|
||||
|
||||
static void
|
||||
|
|
@ -163,7 +167,6 @@ wl_client_connection_data(int fd, uint32_t mask, void *data)
|
|||
object->implementation[opcode], client);
|
||||
|
||||
wl_closure_destroy(closure);
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue