After an evaluation, GNOME has moved from Bugzilla to GitLab. Learn more about GitLab.
No new issues can be reported in GNOME Bugzilla anymore.
To report an issue in a GNOME project, go to GNOME GitLab.
Do not go to GNOME Gitlab for: Bluefish, Doxygen, GnuCash, GStreamer, java-gnome, LDTP, NetworkManager, Tomboy.
Bug 737957 - GtkTextView pixel-cache layer changes break existing drawing
GtkTextView pixel-cache layer changes break existing drawing
Status: RESOLVED FIXED
Product: gtk+
Classification: Platform
Component: Widget: GtkTextView
3.14.x
Other Linux
: Normal major
: ---
Assigned To: gtk-bugs
gtk-bugs
Depends on:
Blocks:
 
 
Reported: 2014-10-05 21:21 UTC by Kai Willadsen
Modified: 2014-10-09 22:12 UTC
See Also:
GNOME target: ---
GNOME version: ---


Attachments
Meld 3.12 on Fedora 21 alpha showing missing background colours in GtkTextView (30.55 KB, image/png)
2014-10-05 21:21 UTC, Kai Willadsen
Details

Description Kai Willadsen 2014-10-05 21:21:59 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?
Comment 1 Matthias Clasen 2014-10-06 11:52:16 UTC
you can turn off the pixel cache with GTK_DEBUG=no-pixel-cache
Comment 2 Kai Willadsen 2014-10-06 21:08:47 UTC
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.
Comment 3 Matthias Clasen 2014-10-08 01:56:43 UTC
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.
Comment 4 Kai Willadsen 2014-10-09 20:31:47 UTC
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.
Comment 5 Matthias Clasen 2014-10-09 22:12:52 UTC
I'm adding a note to the README about these issues, anyway.