weston: Clip window title text to the frame

Fixes an issue with text overflowing the available frame space.
This commit is contained in:
Martin Minarik 2012-07-02 23:05:50 +02:00 committed by Kristian Høgsberg
parent 1248158e7d
commit 5f3eddc07a
1 changed files with 5 additions and 0 deletions

View File

@ -401,6 +401,11 @@ theme_render_frame(struct theme *t,
width - t->margin * 2, height - t->margin * 2, width - t->margin * 2, height - t->margin * 2,
t->width, t->titlebar_height); t->width, t->titlebar_height);
cairo_rectangle (cr, t->margin + t->width, t->margin,
width - (t->margin + t->width) * 2,
t->titlebar_height - t->width);
cairo_clip(cr);
cairo_set_operator(cr, CAIRO_OPERATOR_OVER); cairo_set_operator(cr, CAIRO_OPERATOR_OVER);
cairo_select_font_face(cr, "sans", cairo_select_font_face(cr, "sans",
CAIRO_FONT_SLANT_NORMAL, CAIRO_FONT_SLANT_NORMAL,