GNOME Bugzilla – Bug 737957
GtkTextView pixel-cache layer changes break existing drawing
Last modified: 2014-10-09 22:12:52 UTC
Created attachment 287778 [details] Meld 3.12 on Fedora 21 alpha showing missing background colours in GtkTextView I admit that I haven't bisected this, but reading through bug 708423 and the follow-up changes, it certainly looks like the pixel cache changes are the likely culprit. The problem is that previously, if you hooked into expose-event/draw and painted on the surface, that would show up later, since GtkTextView only drew text over the top. Meld has relied on this working pretty much forever. Much like the GtkSourceView guys, I appreciate that what Meld does at the moment is a hack, so the new draw-layer vfunc is definitely something I want to use. However, all of this drawing is currently orchestrated outside our GtkSourceView subclass, so switching over to use the draw-layer API isn't a small change, and certainly isn't something I'd like to do in a stable release series. However, I'd also like Meld to actually work in upcoming GTK+ 3.14 distributions. Is there an easy/safe way to workaround these changes so that we continue to draw correctly on 3.14?
you can turn off the pixel cache with GTK_DEBUG=no-pixel-cache
Sadly, this doesn't actually workaround the problem (again, tested on Fedora 21 alpha). I'll see if I can isolate the relevant commit. It may be that the changes around introducing the draw_layer vfunc are actually the problem.
In addition to the pixelcache, we are also drawing a background in GtkTextView::draw now. That might well cover up whatever you are trying to draw underneath. As a workaround, you could try to set custom css that forces a transparent background on the text view.
Thanks for the pointer. That has worked (as long as the GtkSourceView theme doesn't paint its own background; not directly GTK's problem though), but now drawing of the highlight for text selection has broken. I'll try and chase that one down. Anyway, unless there's actually anything GTK-side that may be done to fix this, I guess there's not much need for this bug, so feel free to close.
I'm adding a note to the README about these issues, anyway.