diff options
author | Martin Minarik <minarik11@student.fiit.stuba.sk> | 2012-07-02 23:05:50 +0200 |
---|---|---|
committer | Kristian Høgsberg <krh@bitplanet.net> | 2012-07-09 17:28:09 -0400 |
commit | 5f3eddc07a1e50ee22681f31d4fd26a55fb7a9fc (patch) | |
tree | 1576fdf4d085ba12334855e08999c369062791dc /shared | |
parent | 1248158e7d9a14cbed14b47c83bf83d4ca61ec91 (diff) |
weston: Clip window title text to the frame
Fixes an issue with text overflowing the available frame space.
Diffstat (limited to 'shared')
-rw-r--r-- | shared/cairo-util.c | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/shared/cairo-util.c b/shared/cairo-util.c index 649ed985..c64ace2f 100644 --- a/shared/cairo-util.c +++ b/shared/cairo-util.c @@ -401,6 +401,11 @@ 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 + t->width) * 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, |