GNOME Bugzilla – Bug 767085
gtksourceview-3.18.3 causes blank gutter in meld-3.16.0
Last modified: 2016-06-10 20:03:28 UTC
Created attachment 328842 [details] Meld screenshot Problem is at the right-hand edge of the left-hand source pane. (Blue lines should be continuous with icons in the gap) Works fine with gtksourceview-3.18.2. Screen shot attached.
A lot of commits from 3.20 and git master have been backported on 3.18 (between 3.18.2 and 3.18.3) by Paolo. Since GTK+ 3.18 and 3.20 are not compatible for certain things related to the theme, it was maybe not a good idea. It would be useful to know if Meld works fine with GtkSourceView 3.20 and GTK+ 3.20. (if Meld has been ported to GTK+ 3.20 wrt the theme and CSS changes). To know whether the problem comes from the original commits on master, or comes only from the backporting on 3.18.
meld-3.16.0 looks fine on Arch with gtksourceview3 3.20.3-1 and gtk3 3.20.6-1.
Ok, thanks for testing. So the problem comes from the backporting. Worst case we can revert to the state of 3.18.2 for 3.18.4. Back to square one.
Created attachment 328983 [details] [review] Revert "gutter: avoid connecting to GtkWidget::draw()" I did some bisecting and identified "gutter: avoid connecting to GtkWidget::draw()" as the problem. https://git.gnome.org/browse/gtksourceview/commit/?h=gnome-3-18&id=68aa22baac9733b739ac6c47e64cf8d7515496bd Tested by applying a reversed diff of this commit to gtksourceview-3.18.3 (slightly tweaked for one of the coding style changes https://git.gnome.org/browse/gtksourceview/commit/gtksourceview/gtksourceview.c?h=gnome-3-18&id=2b646b409d5b5c9948e535097bc7af6251f04d91 ) and then meld-3.16.0 works fine for me. Patch used attached.
Created attachment 328986 [details] [review] Revert "gutter: avoid connecting to GtkWidget::draw()" Remove change to gtksourcegutter-private.h, caused by: https://git.gnome.org/browse/gtksourceview/diff/gtksourceview/gtksourcegutter-private.h?h=gnome-3-18&id=2b646b409d5b5c9948e535097bc7af6251f04d91
Created attachment 328987 [details] [review] Revert "gutter: avoid connecting to GtkWidget::draw()" Third time lucky.
It's strange that it is this commit that breaks Meld. This commit should work on 3.18 too. This commit is also present in GtkSourceView 3.20.3. So maybe it works on 3.20, but only by chance? The problem in Meld is at the right gutter. There must be something going on.
Christian, can you look at it?
Sure I'll take a look today
Comment on attachment 328987 [details] [review] Revert "gutter: avoid connecting to GtkWidget::draw()" Thanks for your patch. Pushed in the gnome-3-18 branch as commit c0d3919deb11547602f54d81fe382401ff5ed399.
BTW I was able to reproduce the problem in Meld. And indeed it doesn't happen on 3.20 or git master. It would be better to investigate the problem further, to understand why the problem happens on 3.18. Otherwise we'll need to revert the patch on master and 3.20 too, because it might cause other problems in other applications. And I've released GtkSourceView 3.18.4, but it's safer to stay at 3.18.2.
There is a lot to tromp through between 3.18 and 3.20 that could be related: * CSS Nodes and clipping changes * borders and text have separate nodes now * BELOW_TEXT and ABOVE_TEXT was added * CSS margin work * Changes to paint_border_window() An argument could be made for each of those having a possibility to interfere here. I think reverting on 3.18 is appropriate but we should leave it on master.
OK, so it's probably a bug in GTK+ 3.18, not worth investigating.