GNOME Bugzilla – Bug 668215
[regression] Selection not highlighted with recent gtk+
Last modified: 2012-01-24 18:14:27 UTC
I'm running the git master of evo and friends in what is otherwise a gnome-3.3.4 environment (at least up to the tarballs that have been released). If I try to highlight some text in an email (e.g., in drag and drop or for copy/paste) the selection works, but the text is never highlighted. This happens when reading or composing an e-mail. I'm running with glib-2.31.10 and gtk+-3.3.8
I would guess it's something either with gtk, or with your theme. Being it a theme, then it might be possible to reproduce this in things like entries for a Subject, or in the gtk3-demo application. Also, if you select the text by mouse, and it is not highlighted, will simple Delete button press delete the supposed-to-be-highlighted text or not?
I'm not so sure. Other applications (e.g., gnome-terminal, gedit, firefox, gtk3-demo) all work as expected. The selection process seems to work, e.g., I can delete the selected text. It's the highlighting that's broken.
One more observation. It seems that it's broken only in some of evo's widgets. For example, I can't highlight in the actual email, but I can in the header as displayed in the mail UI (e.g., the subject)
It sounds like GtkHTML reads colors for selected text from incorrect key/place.
Following Milan's off-line suggestion, it turns out that the problem is reproducible in gtkhtml-editor-test. Just type some text and try selecting it.
Tested and confirming, with the current git master of gtk+ (commit 681871d) the selection color is same as color of the usual text. I'll check more next week.
Created attachment 206001 [details] [review] gtkhtml patch for gtkhtml; Let's use GtkStyleContext instead of GtkStyle. It seems to be the main reason of the issue, caused by recent changes in Gtk+. This change is compatible with 3.2.x gtk+ too, thus it's safe to use.
Created commit 48f02e9 in gtkhtml master (4.3.5+)