weston: Clip window title text to the frame

Fixes an issue with text overflowing the available frame space.
Martin Minarik 13 years ago committed by Kristian Høgsberg
parent 1248158e7d
commit 5f3eddc07a
  1. 5
      shared/cairo-util.c

@ -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,

Loading…
Cancel
Save