mirror of
https://github.com/brl/mutter.git
synced 2024-11-29 11:30:45 -05:00
cogland: Embed the wl_surface struct directly into CoglandSurface
The wl_surface struct has been removed from libwayland-server so instead we can just embed its only memeber, the resource, directly into CoglandSurface. http://cgit.freedesktop.org/wayland/wayland/commit/?id=508dd69b5654 https://bugzilla.gnome.org/show_bug.cgi?id=700088 Reviewed-by: Robert Bragg <robert@linux.intel.com> (cherry picked from commit 15c58ce03ce97df659dade0e10be7807eb7b2296)
This commit is contained in:
parent
32a0f88b04
commit
f002e4e78f
@ -25,7 +25,7 @@ typedef struct
|
|||||||
{
|
{
|
||||||
CoglandCompositor *compositor;
|
CoglandCompositor *compositor;
|
||||||
|
|
||||||
struct wl_surface wayland_surface;
|
struct wl_resource resource;
|
||||||
int x;
|
int x;
|
||||||
int y;
|
int y;
|
||||||
struct wl_buffer *buffer;
|
struct wl_buffer *buffer;
|
||||||
@ -656,13 +656,13 @@ cogland_compositor_create_surface (struct wl_client *wayland_client,
|
|||||||
|
|
||||||
surface->compositor = compositor;
|
surface->compositor = compositor;
|
||||||
|
|
||||||
surface->wayland_surface.resource.destroy =
|
surface->resource.destroy =
|
||||||
cogland_surface_resource_destroy_cb;
|
cogland_surface_resource_destroy_cb;
|
||||||
surface->wayland_surface.resource.object.id = id;
|
surface->resource.object.id = id;
|
||||||
surface->wayland_surface.resource.object.interface = &wl_surface_interface;
|
surface->resource.object.interface = &wl_surface_interface;
|
||||||
surface->wayland_surface.resource.object.implementation =
|
surface->resource.object.implementation =
|
||||||
(void (**)(void)) &cogland_surface_interface;
|
(void (**)(void)) &cogland_surface_interface;
|
||||||
surface->wayland_surface.resource.data = surface;
|
surface->resource.data = surface;
|
||||||
|
|
||||||
surface->buffer_destroy_listener.notify =
|
surface->buffer_destroy_listener.notify =
|
||||||
surface_handle_buffer_destroy;
|
surface_handle_buffer_destroy;
|
||||||
@ -672,7 +672,7 @@ cogland_compositor_create_surface (struct wl_client *wayland_client,
|
|||||||
wl_list_init (&surface->pending.frame_callback_list);
|
wl_list_init (&surface->pending.frame_callback_list);
|
||||||
region_init (&surface->pending.damage);
|
region_init (&surface->pending.damage);
|
||||||
|
|
||||||
wl_client_add_resource (wayland_client, &surface->wayland_surface.resource);
|
wl_client_add_resource (wayland_client, &surface->resource);
|
||||||
|
|
||||||
compositor->surfaces = g_list_prepend (compositor->surfaces,
|
compositor->surfaces = g_list_prepend (compositor->surfaces,
|
||||||
surface);
|
surface);
|
||||||
@ -993,7 +993,7 @@ get_shell_surface (struct wl_client *client,
|
|||||||
|
|
||||||
shell_surface->surface = surface;
|
shell_surface->surface = surface;
|
||||||
shell_surface->surface_destroy_listener.notify = shell_handle_surface_destroy;
|
shell_surface->surface_destroy_listener.notify = shell_handle_surface_destroy;
|
||||||
wl_signal_add (&surface->wayland_surface.resource.destroy_signal,
|
wl_signal_add (&surface->resource.destroy_signal,
|
||||||
&shell_surface->surface_destroy_listener);
|
&shell_surface->surface_destroy_listener);
|
||||||
|
|
||||||
surface->has_shell_surface = TRUE;
|
surface->has_shell_surface = TRUE;
|
||||||
|
Loading…
Reference in New Issue
Block a user