From b5dbe857db4d691b5a909a1e596f15cdc80c633a Mon Sep 17 00:00:00 2001 From: Dana Jansens Date: Wed, 25 Apr 2007 18:26:02 +0000 Subject: dont go to disabled menu entries with keyboard shortcuts fix some rendering of shortcuts --- render/font.c | 15 +++++++-------- 1 file changed, 7 insertions(+), 8 deletions(-) (limited to 'render') diff --git a/render/font.c b/render/font.c index 1208e9ef..8692a9d1 100644 --- a/render/font.c +++ b/render/font.c @@ -221,6 +221,13 @@ void RrFontDraw(XftDraw *d, RrTextureText *t, RrRect *area) t->font->shortcut_underline->start_index = 0; t->font->shortcut_underline->end_index = 0; + /* the attributes are owned by the layout. + re-add the attributes to the layout after changing the + start and end index */ + attrlist = pango_layout_get_attributes(t->font->layout); + pango_attr_list_ref(attrlist); + pango_layout_set_attributes(t->font->layout, attrlist); + pango_attr_list_unref(attrlist); if (t->shadow_offset_x || t->shadow_offset_y) { c.color.red = t->shadow_color->r | t->shadow_color->r << 8; @@ -229,14 +236,6 @@ void RrFontDraw(XftDraw *d, RrTextureText *t, RrRect *area) c.color.alpha = 0xffff * t->shadow_alpha / 255; c.pixel = t->shadow_color->pixel; - /* the attributes are owned by the layout. - re-add the attributes to the layout after changing the - start and end index */ - attrlist = pango_layout_get_attributes(t->font->layout); - pango_attr_list_ref(attrlist); - pango_layout_set_attributes(t->font->layout, attrlist); - pango_attr_list_unref(attrlist); - /* see below... */ pango_xft_render_layout_line (d, &c, pango_layout_get_line(t->font->layout, 0), -- cgit v1.2.3