[PATCH weston] shell: Respect output transformation for input panel surface

Eoff, Ullysses A ullysses.a.eoff at intel.com
Fri Jul 12 12:41:24 PDT 2013


This patch fixes <https://bugs.freedesktop.org/show_bug.cgi?id=66798> for me.

U. Artie Eoff

> -----Original Message-----
> From: wayland-devel-bounces+ullysses.a.eoff=intel.com at lists.freedesktop.org [mailto:wayland-devel-
> bounces+ullysses.a.eoff=intel.com at lists.freedesktop.org] On Behalf Of Rob Bradford
> Sent: Thursday, July 11, 2013 5:21 AM
> To: wayland-devel at lists.freedesktop.org
> Cc: Rob Bradford
> Subject: [PATCH weston] shell: Respect output transformation for input panel surface
> 
> From: Rob Bradford <rob at linux.intel.com>
> 
> Rather than using the dimensions in the mode we can use the recently
> added output width and height members which are updated to reflect any
> output rotation.
> 
> https://bugs.freedesktop.org/show_bug.cgi?id=66798
> ---
>  src/shell.c | 7 ++-----
>  1 file changed, 2 insertions(+), 5 deletions(-)
> 
> diff --git a/src/shell.c b/src/shell.c
> index 69345b0..7e98831 100644
> --- a/src/shell.c
> +++ b/src/shell.c
> @@ -3732,7 +3732,6 @@ input_panel_configure(struct weston_surface *surface, int32_t sx, int32_t sy, in
>  {
>  	struct input_panel_surface *ip_surface = surface->configure_private;
>  	struct desktop_shell *shell = ip_surface->shell;
> -	struct weston_mode *mode;
>  	float x, y;
>  	uint32_t show_surface = 0;
> 
> @@ -3752,10 +3751,8 @@ input_panel_configure(struct weston_surface *surface, int32_t sx, int32_t sy, in
>  		x = shell->text_input.surface->geometry.x + shell->text_input.cursor_rectangle.x2;
>  		y = shell->text_input.surface->geometry.y + shell->text_input.cursor_rectangle.y2;
>  	} else {
> -		mode = ip_surface->output->current;
> -
> -		x = ip_surface->output->x + (mode->width - width) / 2;
> -		y = ip_surface->output->y + mode->height - height;
> +		x = ip_surface->output->x + (ip_surface->output->width - width) / 2;
> +		y = ip_surface->output->y + ip_surface->output->height - height;
>  	}
> 
>  	weston_surface_configure(surface,
> --
> 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