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

Martin Minarik minarik11 at student.fiit.stuba.sk
Mon Jul 2 14:05:50 PDT 2012


Fixes an issue with text overflowing the available frame space.
---
 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



More information about the wayland-devel mailing list