[PATCH weston 2/7] xwayland: add set_toplevel_with_position to internal API

Quentin Glidic sardemff7+wayland at sardemff7.net
Tue Nov 29 19:23:29 UTC 2016


On 29/11/2016 16:11, Pekka Paalanen wrote:
> From: Pekka Paalanen <pekka.paalanen at collabora.co.uk>
>
> Add a new entry to the internal interface between the xwayland plugin
> and libweston-desktop (or any other desktop protocol implementation).
> The new entry is identical to set_toplevel except it carries an absolute
> position for the toplevel window.
>
> Following patches will implement this new entry in
> libweston-desktop and start using it in XWM.
>
> Signed-off-by: Pekka Paalanen <pekka.paalanen at collabora.co.uk>
> ---
>  xwayland/xwayland-internal-interface.h | 2 ++
>  1 file changed, 2 insertions(+)
>
> diff --git a/xwayland/xwayland-internal-interface.h b/xwayland/xwayland-internal-interface.h
> index e771730..1096444 100644
> --- a/xwayland/xwayland-internal-interface.h
> +++ b/xwayland/xwayland-internal-interface.h
> @@ -38,6 +38,8 @@ struct weston_desktop_xwayland_interface {
>  						      struct weston_surface *surface,
>  						      const struct weston_xwayland_client_interface *client);
>  	void (*set_toplevel)(struct weston_desktop_xwayland_surface *shsurf);
> +	void (*set_toplevel_with_position)(struct weston_desktop_xwayland_surface *shsurf,
> +					   int32_t x, int32_t y);

Why not "set_position"? It seems cleaner to me, and potentially usable 
for other types. Since this is an internal detail, we should be safe 
from bad code to call it too much.

Patch 4 would need an update then.

Cheers,


>  	void (*set_parent)(struct weston_desktop_xwayland_surface *shsurf,
>  			   struct weston_surface *parent);
>  	void (*set_transient)(struct weston_desktop_xwayland_surface *shsurf,
>


-- 

Quentin “Sardem FF7” Glidic


More information about the wayland-devel mailing list