diff options
author | Corentin Chary <corentin.chary@gmail.com> | 2011-06-10 10:27:16 +0200 |
---|---|---|
committer | Kristian Høgsberg <krh@bitplanet.net> | 2011-06-11 17:32:54 -0400 |
commit | 98d8256b8e67a417eebc314440716e66926adf92 (patch) | |
tree | 7f04ef7c3363f7b87553499b400bcecbefde8263 | |
parent | d8f2e5d6ab0205141e3d6c41b815cd8029bb2911 (diff) |
Call a new global listener for each existing globalupstream-experimental
Signed-off-by: Corentin Chary <corentin.chary@gmail.com>
-rw-r--r-- | wayland/wayland-client.c | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/wayland/wayland-client.c b/wayland/wayland-client.c index 0852662..932f8b4 100644 --- a/wayland/wayland-client.c +++ b/wayland/wayland-client.c @@ -113,6 +113,7 @@ wl_display_add_global_listener(struct wl_display *display, wl_display_global_func_t handler, void *data) { struct wl_global_listener *listener; + struct wl_global *global; listener = malloc(sizeof *listener); if (listener == NULL) @@ -122,6 +123,10 @@ wl_display_add_global_listener(struct wl_display *display, listener->data = data; wl_list_insert(display->global_listener_list.prev, &listener->link); + wl_list_for_each(global, &display->global_list, link) + (*listener->handler)(display, global->id, global->interface, + global->version, listener->data); + return listener; } |