[PATCH 6/6] compositor: introduce internal shell_surface helpers

Ander Conselvan de Oliveira conselvan2 at gmail.com
Tue Apr 17 00:43:07 PDT 2012


On 04/16/2012 05:31 PM, Tiago Vignatti wrote:
> We're able now to create shell_surfaces inside Weston. This makes possible the
> glue needed between shell and xserver-launcher.
>
> Signed-off-by: Tiago Vignatti<tiago.vignatti at intel.com>
> ---
>   src/compositor.h       |   24 +++++++++++++++++++++++-
>   src/shell.c            |    8 +++++---
>   src/xserver-launcher.c |   13 +++++++++++++
>   3 files changed, 41 insertions(+), 4 deletions(-)
>
> diff --git a/src/compositor.h b/src/compositor.h
> index f2860b6..be01a9f 100644
> --- a/src/compositor.h
> +++ b/src/compositor.h
[...]
> @@ -152,6 +153,27 @@ struct weston_spring {
>   	uint32_t timestamp;
>   };
>
> +struct weston_shell_surface {
> +	void *shell;			/* either desktop or tablet */
> +	void (*create_shell_surface) (void *shell,
> +				      struct weston_surface *surface,
> +				      struct shell_surface **ret);
> +
> +	/* shell_surface operations */
> +	void (*set_toplevel)(struct shell_surface *shsurf);
> +	void (*set_transiant)(struct shell_surface *shsurf,
> +			      struct shell_surface *pshsurf,
> +			      int x, int y, uint32_t flags);
> +	void (*set_fullscreen)(struct shell_surface *shsurf,
> +			       struct weston_output *output,
> +			       uint32_t method, uint32_t framerate);
> +	void (*set_maximized)(struct shell_surface *shsurf,
> +			      struct weston_output *output);
> +	void (*set_popup)(struct shell_surface *shsurf,
> +			  struct shell_surface *pshsurf,
> +			  int32_t x, int32_t y);
> +};

The relationship between this structure and struct shell_surface is a 
bit odd. Wouldn't this be better named with something along the lines of 
weston_shell_surface_interface (but possibly shorter)?


Cheers,
Ander


More information about the wayland-devel mailing list