[RFC wayland] protocol: Send the interface name when removing globals
Kristian Høgsberg
hoegsberg at gmail.com
Thu Feb 14 06:32:31 PST 2013
On Thu, Feb 14, 2013 at 01:16:45PM +0000, Rob Bradford wrote:
> From: Rob Bradford <rob at linux.intel.com>
>
> This allows a client to figure out the type of the object that has been
> removed from the registry. In particular this allows the client to
> differentiate between output devices and seats being removed.
I'm not sure... I think we may be better off just adding a delete
event to every global object that may disappear and just use the
global_delete event for managing the list of currently available
globals.
But even in the current model, couldn't we just (client side) track
the objects that a client has bound to a global and then destroy those
once we get the global_delete event for a global?
Kristian
> ---
> protocol/wayland.xml | 3 ++-
> src/wayland-server.c | 3 ++-
> 2 files changed, 4 insertions(+), 2 deletions(-)
>
> diff --git a/protocol/wayland.xml b/protocol/wayland.xml
> index 0ce68ef..8a2be68 100644
> --- a/protocol/wayland.xml
> +++ b/protocol/wayland.xml
> @@ -92,7 +92,7 @@
> </event>
> </interface>
>
> - <interface name="wl_registry" version="1">
> + <interface name="wl_registry" version="2">
> <description summary="global registry object">
> The global registry object. The server has a number of global
> objects that are available to all clients. These objects
> @@ -144,6 +144,7 @@
> the global going away and a client sending a request to it.
> </description>
> <arg name="name" type="uint"/>
> + <arg name="interface" type="string"/>
> </event>
> </interface>
>
> diff --git a/src/wayland-server.c b/src/wayland-server.c
> index dae7177..cc8d28c 100644
> --- a/src/wayland-server.c
> +++ b/src/wayland-server.c
> @@ -1172,7 +1172,8 @@ wl_display_remove_global(struct wl_display *display, struct wl_global *global)
>
> wl_list_for_each(resource, &display->registry_resource_list, link)
> wl_resource_post_event(resource, WL_REGISTRY_GLOBAL_REMOVE,
> - global->name);
> + global->name,
> + global->interface->name);
> wl_list_remove(&global->link);
> free(global);
> }
> --
> 1.8.1
>
> _______________________________________________
> wayland-devel mailing list
> wayland-devel at lists.freedesktop.org
> http://lists.freedesktop.org/mailman/listinfo/wayland-devel
More information about the wayland-devel
mailing list