mirror of
https://github.com/brl/mutter.git
synced 2024-11-22 16:10:41 -05:00
wayland: Clean up surface creation
This commit is contained in:
parent
0bf5c831d5
commit
59fc9d832b
@ -569,14 +569,15 @@ wl_surface_destructor (struct wl_resource *resource)
|
||||
MetaWaylandSurface *
|
||||
meta_wayland_surface_create (MetaWaylandCompositor *compositor,
|
||||
struct wl_client *client,
|
||||
guint32 id,
|
||||
guint32 version)
|
||||
struct wl_resource *compositor_resource,
|
||||
guint32 id)
|
||||
{
|
||||
MetaWaylandSurface *surface = g_slice_new0 (MetaWaylandSurface);
|
||||
|
||||
surface->compositor = compositor;
|
||||
|
||||
surface->resource = wl_resource_create (client, &wl_surface_interface, version, id);
|
||||
surface->resource = wl_resource_create (client, &wl_surface_interface,
|
||||
MIN (META_WL_SURFACE_VERSION, wl_resource_get_version (compositor_resource)), id);
|
||||
wl_resource_set_implementation (surface->resource, &meta_wayland_wl_surface_interface, surface, wl_surface_destructor);
|
||||
|
||||
surface->buffer_destroy_listener.notify = surface_handle_buffer_destroy;
|
||||
|
@ -116,8 +116,8 @@ void meta_wayland_shell_init (MetaWaylandCompositor *composit
|
||||
|
||||
MetaWaylandSurface *meta_wayland_surface_create (MetaWaylandCompositor *compositor,
|
||||
struct wl_client *client,
|
||||
guint32 id,
|
||||
guint32 version);
|
||||
struct wl_resource *compositor_resource,
|
||||
guint32 id);
|
||||
|
||||
void meta_wayland_surface_set_window (MetaWaylandSurface *surface,
|
||||
MetaWindow *window);
|
||||
@ -139,5 +139,4 @@ void meta_wayland_surface_delete (MetaWaylandSurface *surface);
|
||||
|
||||
void meta_wayland_surface_popup_done (MetaWaylandSurface *surface);
|
||||
|
||||
|
||||
#endif
|
||||
|
@ -199,16 +199,13 @@ meta_wayland_compositor_repick (MetaWaylandCompositor *compositor)
|
||||
}
|
||||
|
||||
static void
|
||||
meta_wayland_compositor_create_surface (struct wl_client *wayland_client,
|
||||
struct wl_resource *wayland_compositor_resource,
|
||||
meta_wayland_compositor_create_surface (struct wl_client *client,
|
||||
struct wl_resource *resource,
|
||||
guint32 id)
|
||||
{
|
||||
MetaWaylandCompositor *compositor =
|
||||
wl_resource_get_user_data (wayland_compositor_resource);
|
||||
MetaWaylandCompositor *compositor = wl_resource_get_user_data (resource);
|
||||
|
||||
meta_wayland_surface_create (compositor, wayland_client, id,
|
||||
MIN (META_WL_SURFACE_VERSION,
|
||||
wl_resource_get_version (wayland_compositor_resource)));
|
||||
meta_wayland_surface_create (compositor, client, resource, id);
|
||||
}
|
||||
|
||||
static void
|
||||
|
Loading…
Reference in New Issue
Block a user