[PATCH weston 5/6] toytoolkit: implement a window_present() helper function

Bryce Harrington bryce at osg.samsung.com
Mon Apr 13 14:01:44 PDT 2015


On Thu, Apr 09, 2015 at 06:24:46PM +0200, Manuel Bachmann wrote:
> "window_present()" is a little helper function calling
> "xdg_surface_present()" on a toytoolkit shell surface.
> 
> Signed-off-by: Manuel Bachmann <manuel.bachmann at open.eurogiciel.org>

Reviewed-by: Bryce Harrington <bryce at osg.samsung.com>
> ---
>  clients/window.c | 9 +++++++++
>  clients/window.h | 3 +++
>  2 files changed, 12 insertions(+)
> 
> diff --git a/clients/window.c b/clients/window.c
> index 81e007b..cfa0451 100644
> --- a/clients/window.c
> +++ b/clients/window.c
> @@ -4337,6 +4337,15 @@ window_set_minimized(struct window *window)
>  }
>  
>  void
> +window_present(struct window *window)
> +{
> +	if (!window->xdg_surface)
> +		return;
> +
> +	xdg_surface_present(window->xdg_surface);
> +}
> +
> +void
>  window_set_user_data(struct window *window, void *data)
>  {
>  	window->user_data = data;
> diff --git a/clients/window.h b/clients/window.h
> index 0686c3f..b2d6f9c 100644
> --- a/clients/window.h
> +++ b/clients/window.h
> @@ -395,6 +395,9 @@ void
>  window_set_minimized(struct window *window);
>  
>  void
> +window_present(struct window *window);
> +
> +void
>  window_set_user_data(struct window *window, void *data);
>  
>  void *
> -- 
> 1.8.3.1
> 
> _______________________________________________
> wayland-devel mailing list
> wayland-devel at lists.freedesktop.org
> http://lists.freedesktop.org/mailman/listinfo/wayland-devel


More information about the wayland-devel mailing list