mirror of
https://gitlab.freedesktop.org/wayland/wayland.git
synced 2025-11-02 09:01:39 -05:00
Send device name at connect time
This commit is contained in:
parent
945ea0e743
commit
478d9265f9
16 changed files with 139 additions and 161 deletions
12
wayland.c
12
wayland.c
|
|
@ -275,6 +275,16 @@ wl_client_send_acknowledge(struct wl_client *client,
|
|||
WL_COMPOSITOR_ACKNOWLEDGE, key, frame);
|
||||
}
|
||||
|
||||
static void
|
||||
post_compositor_device(struct wl_client *client, struct wl_object *global)
|
||||
{
|
||||
struct wl_compositor *compositor =
|
||||
container_of(global, struct wl_compositor, base);
|
||||
|
||||
wl_client_post_event(client, global,
|
||||
WL_COMPOSITOR_DEVICE, compositor->device);
|
||||
}
|
||||
|
||||
WL_EXPORT int
|
||||
wl_display_set_compositor(struct wl_display *display,
|
||||
struct wl_compositor *compositor,
|
||||
|
|
@ -284,7 +294,7 @@ wl_display_set_compositor(struct wl_display *display,
|
|||
compositor->base.implementation = (void (**)(void)) implementation;
|
||||
|
||||
wl_display_add_object(display, &compositor->base);
|
||||
if (wl_display_add_global(display, &compositor->base, NULL))
|
||||
if (wl_display_add_global(display, &compositor->base, post_compositor_device))
|
||||
return -1;
|
||||
|
||||
return 0;
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue