diff options
author | Jasper St. Pierre <jstpierre@mecheye.net> | 2014-02-28 08:40:42 -0500 |
---|---|---|
committer | Jasper St. Pierre <jstpierre@mecheye.net> | 2014-02-28 09:07:33 -0500 |
commit | e56cbfbd0fd909d58d4d93e17531400395c09a81 (patch) | |
tree | 90206e76b86c815f6a92fb88535af107f6b282cf /src/wayland | |
parent | a27fb19473b9eb768b1f62f83079df654ad6044a (diff) | |
download | mutter-e56cbfbd0fd909d58d4d93e17531400395c09a81.tar.gz |
wayland: Rearrange create_surface_extension a tiny bit
This moves all the "uninteresting" variables we pass to the end.
Diffstat (limited to 'src/wayland')
-rw-r--r-- | src/wayland/meta-wayland-surface.c | 33 |
1 files changed, 19 insertions, 14 deletions
diff --git a/src/wayland/meta-wayland-surface.c b/src/wayland/meta-wayland-surface.c index c7ca67ccf..a70cd496b 100644 --- a/src/wayland/meta-wayland-surface.c +++ b/src/wayland/meta-wayland-surface.c @@ -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, |