[PATCH] weston: Clip window title text to the frame

Kristian Høgsberg hoegsberg at gmail.com
Mon Jul 9 14:28:29 PDT 2012


On Mon, Jul 02, 2012 at 11:05:50PM +0200, Martin Minarik wrote:
> Fixes an issue with text overflowing the available frame space.

Thanks, committed.

Kristian

>  shared/cairo-util.c |    4 ++++
>  1 file changed, 4 insertions(+)
> 
> diff --git a/shared/cairo-util.c b/shared/cairo-util.c
> index 649ed98..6348ff7 100644
> --- a/shared/cairo-util.c
> +++ b/shared/cairo-util.c
> @@ -401,6 +401,10 @@ theme_render_frame(struct theme *t,
>  		    width - t->margin * 2, height - t->margin * 2,
>  		    t->width, t->titlebar_height);
>  
> +	cairo_rectangle (cr, t->margin + t->width, t->margin,
> +			width - t->margin * 2, t->titlebar_height - t->width);
> +	cairo_clip(cr);
> +
>  	cairo_set_operator(cr, CAIRO_OPERATOR_OVER);
>  	cairo_select_font_face(cr, "sans",
>  			       CAIRO_FONT_SLANT_NORMAL,
> -- 
> 1.7.9.5
> 
> _______________________________________________
> 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