mirror of
https://github.com/brl/mutter.git
synced 2024-12-23 19:42:05 +00:00
wayland/outputs: Implement wl_output v3
This version adds a release event, allowing clients to tell the server that it can clean up the related wl_resource. Part-of: <https://gitlab.gnome.org/GNOME/mutter/-/merge_requests/2692>
This commit is contained in:
parent
e43234f464
commit
1b1eed0dbd
@ -99,6 +99,17 @@ output_resource_destroy (struct wl_resource *res)
|
||||
wayland_output->resources = g_list_remove (wayland_output->resources, res);
|
||||
}
|
||||
|
||||
static void
|
||||
meta_wl_output_release (struct wl_client *client,
|
||||
struct wl_resource *resource)
|
||||
{
|
||||
wl_resource_destroy (resource);
|
||||
}
|
||||
|
||||
static const struct wl_output_interface meta_wl_output_interface = {
|
||||
meta_wl_output_release,
|
||||
};
|
||||
|
||||
static enum wl_output_subpixel
|
||||
cogl_subpixel_order_to_wl_output_subpixel (CoglSubpixelOrder subpixel_order)
|
||||
{
|
||||
@ -310,8 +321,10 @@ bind_output (struct wl_client *client,
|
||||
|
||||
wayland_output->resources = g_list_prepend (wayland_output->resources,
|
||||
resource);
|
||||
wl_resource_set_user_data (resource, wayland_output);
|
||||
wl_resource_set_destructor (resource, output_resource_destroy);
|
||||
wl_resource_set_implementation (resource,
|
||||
&meta_wl_output_interface,
|
||||
wayland_output,
|
||||
output_resource_destroy);
|
||||
|
||||
#ifdef WITH_VERBOSE_MODE
|
||||
logical_monitor = meta_monitor_get_logical_monitor (monitor);
|
||||
|
@ -39,7 +39,7 @@
|
||||
#define META_WL_DATA_DEVICE_MANAGER_VERSION 3
|
||||
#define META_XDG_WM_BASE_VERSION 4
|
||||
#define META_WL_SEAT_VERSION 8
|
||||
#define META_WL_OUTPUT_VERSION 2
|
||||
#define META_WL_OUTPUT_VERSION 3
|
||||
#define META_XSERVER_VERSION 1
|
||||
#define META_GTK_SHELL1_VERSION 5
|
||||
#define META_WL_SUBCOMPOSITOR_VERSION 1
|
||||
|
Loading…
Reference in New Issue
Block a user