GNOME Bugzilla – Bug 315599
PangoAttribute remains in wrong context.
Last modified: 2006-07-10 20:24:52 UTC
When I draw PangoLayout with foreground PangoAttribute, then other widget has same foreground color. This problem often happens with input method. After inputting some korean letters and press enter, then some strings in other parts has changed to wrong color. Because the input method module in gtk uses PangAttribute to exchange the style of preedit string. So I made a test code. "text width attributes" is drawn with pango attributes, and the GtkLabel below is not. but the GtkLabel "normal text" also is in red. cairo 0.9.2 pango 1.10.0 gtk 2.8.0
Created attachment 52000 [details] pango attribute test code This code draw 2 strings, one with PangoAttribute and the other with GtkLabel. Only the first one has PangoAttribute, but the color of second one(GtkLabel) changes.
2005-09-09 Owen Taylor <otaylor@redhat.com> * pango/pangocairo-render.c (pango_cairo_show_glyph_string): unset all part colors, since when drawing just a glyph string, prepare_run() isn't called. (#315599, Choe Hwanjin) * pango/pango-renderer.c (pango_renderer_draw_layout_line): NULL out renderer->priv->line_state.
this problem happens again in pango-1.13.2. Please reopen bug 315599 ----- OS Fedora Development 200616 cairo-1.1.8-1 gtk2-2.9.3-4
Ah ok, my fault. Will fix.
2006-07-10 Behdad Esfahbod <behdad@gnome.org> Bug 315599 – PangoAttribute remains in wrong context. * pango/pangocairo-render.c (_pango_cairo_do_glyph_string): Rever my commit that removed Owen's fix from last year! Seems like I removed all the exact lines that Owen added with this commit message: 2006-05-30 Behdad Esfahbod <behdad@gnome.org> * pango/pangocairo-render.c (draw_error_underline): Fix offset to center the underline in requested rectangle. * pango/pangocairo-render.c (pango_cairo_show_glyph_string): Remove unncessary renderer activation and cleanup. Oops! Check them out: Owen's: http://cvs.gnome.org/viewcvs/pango/pango/pangocairo-render.c?r1=1.8&r2=1.9 Mine: http://cvs.gnome.org/viewcvs/pango/pango/pangocairo-render.c?r1=1.19&r2=1.20 Put a not in the source, such that I don't remove it again ;)