gtk+pango+cairo: really hard to draw text selection
Submitted by Felipe Heidrich
Link to original bug (#344919)
Description
gtk 2.9.1
I'm rewritting my text widget to use pango+cairo integration and it is really hard to get the selection right when the text has styles. As far as I can see the only way to do it is by modifying the pangoattrlist (add a new style to simulate the selection foreground/background), but likely the performance will be bad.
In the old world, for drawing the selection, I used: gdk_pango_layout_get_clip_region gdk_gc_set_clip_region gdk_draw_layout_with_colors
I read part of gtk code and only GtkEntry was updated to use cairo, textview and label are still using gdk.