wayland: Rearrange create_surface_extension a tiny bit
This moves all the "uninteresting" variables we pass to the end.
This commit is contained in:
parent
a27fb19473
commit
e56cbfbd0f
@ -668,13 +668,13 @@ get_resource_version (struct wl_resource *master_resource,
|
||||
|
||||
static gboolean
|
||||
create_surface_extension (MetaWaylandSurfaceExtension *extension,
|
||||
MetaWaylandSurface *surface,
|
||||
struct wl_resource *master_resource,
|
||||
guint32 id,
|
||||
int max_version,
|
||||
const struct wl_interface *interface,
|
||||
const void *implementation,
|
||||
wl_resource_destroy_func_t destructor)
|
||||
wl_resource_destroy_func_t destructor,
|
||||
MetaWaylandSurface *surface,
|
||||
struct wl_resource *master_resource,
|
||||
guint32 id)
|
||||
{
|
||||
struct wl_client *client;
|
||||
|
||||
@ -958,11 +958,12 @@ xdg_shell_get_xdg_surface (struct wl_client *client,
|
||||
{
|
||||
MetaWaylandSurface *surface = wl_resource_get_user_data (surface_resource);
|
||||
|
||||
if (!create_surface_extension (&surface->xdg_surface, surface, resource, id,
|
||||
if (!create_surface_extension (&surface->xdg_surface,
|
||||
META_XDG_SURFACE_VERSION,
|
||||
&xdg_surface_interface,
|
||||
&meta_wayland_xdg_surface_interface,
|
||||
xdg_surface_destructor))
|
||||
xdg_surface_destructor,
|
||||
surface, resource, id))
|
||||
{
|
||||
wl_resource_post_error (surface_resource,
|
||||
WL_DISPLAY_ERROR_INVALID_OBJECT,
|
||||
@ -1014,11 +1015,12 @@ xdg_shell_get_xdg_popup (struct wl_client *client,
|
||||
if (parent_surf == NULL || parent_surf->window == NULL)
|
||||
return;
|
||||
|
||||
if (!create_surface_extension (&surface->xdg_popup, surface, resource, id,
|
||||
if (!create_surface_extension (&surface->xdg_popup,
|
||||
META_XDG_POPUP_VERSION,
|
||||
&xdg_popup_interface,
|
||||
&meta_wayland_xdg_popup_interface,
|
||||
xdg_popup_destructor))
|
||||
xdg_popup_destructor,
|
||||
surface, resource, id))
|
||||
{
|
||||
wl_resource_post_error (surface_resource,
|
||||
WL_DISPLAY_ERROR_INVALID_OBJECT,
|
||||
@ -1329,11 +1331,12 @@ wl_shell_get_shell_surface (struct wl_client *client,
|
||||
{
|
||||
MetaWaylandSurface *surface = wl_resource_get_user_data (surface_resource);
|
||||
|
||||
if (!create_surface_extension (&surface->wl_shell_surface, surface, resource, id,
|
||||
if (!create_surface_extension (&surface->wl_shell_surface,
|
||||
META_WL_SHELL_SURFACE_VERSION,
|
||||
&wl_shell_surface_interface,
|
||||
&meta_wayland_wl_shell_surface_interface,
|
||||
wl_shell_surface_destructor))
|
||||
wl_shell_surface_destructor,
|
||||
surface, resource, id))
|
||||
{
|
||||
wl_resource_post_error (surface_resource,
|
||||
WL_DISPLAY_ERROR_INVALID_OBJECT,
|
||||
@ -1412,11 +1415,12 @@ get_gtk_surface (struct wl_client *client,
|
||||
{
|
||||
MetaWaylandSurface *surface = wl_resource_get_user_data (surface_resource);
|
||||
|
||||
if (!create_surface_extension (&surface->gtk_surface, surface, resource, id,
|
||||
if (!create_surface_extension (&surface->gtk_surface,
|
||||
META_GTK_SURFACE_VERSION,
|
||||
>k_surface_interface,
|
||||
&meta_wayland_gtk_surface_interface,
|
||||
gtk_surface_destructor))
|
||||
gtk_surface_destructor,
|
||||
surface, resource, id))
|
||||
{
|
||||
wl_resource_post_error (surface_resource,
|
||||
WL_DISPLAY_ERROR_INVALID_OBJECT,
|
||||
@ -1699,11 +1703,12 @@ wl_subcompositor_get_subsurface (struct wl_client *client,
|
||||
MetaWaylandSurface *surface = wl_resource_get_user_data (surface_resource);
|
||||
MetaWaylandSurface *parent = wl_resource_get_user_data (parent_resource);
|
||||
|
||||
if (!create_surface_extension (&surface->subsurface, surface, resource, id,
|
||||
if (!create_surface_extension (&surface->subsurface,
|
||||
META_GTK_SURFACE_VERSION,
|
||||
&wl_subsurface_interface,
|
||||
&meta_wayland_subsurface_interface,
|
||||
wl_subsurface_destructor))
|
||||
wl_subsurface_destructor,
|
||||
surface, resource, id))
|
||||
{
|
||||
wl_resource_post_error (surface_resource,
|
||||
WL_DISPLAY_ERROR_INVALID_OBJECT,
|
||||
|
Loading…
Reference in New Issue
Block a user