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 767085 - gtksourceview-3.18.3 causes blank gutter in meld-3.16.0
gtksourceview-3.18.3 causes blank gutter in meld-3.16.0
Status: RESOLVED FIXED
Product: gtksourceview
Classification: Platform
Component: General
3.18.x
Other Linux
: Normal normal
: ---
Assigned To: GTK Sourceview maintainers
GTK Sourceview maintainers
Depends on:
Blocks:
 
 
Reported: 2016-05-31 19:20 UTC by Chris Mayo
Modified: 2016-06-10 20:03 UTC
See Also:
GNOME target: ---
GNOME version: ---


Attachments
Meld screenshot (131.50 KB, image/png)
2016-05-31 19:20 UTC, Chris Mayo
  Details
Revert "gutter: avoid connecting to GtkWidget::draw()" (2.56 KB, patch)
2016-06-02 17:14 UTC, Chris Mayo
none Details | Review
Revert "gutter: avoid connecting to GtkWidget::draw()" (2.18 KB, patch)
2016-06-02 17:25 UTC, Chris Mayo
none Details | Review
Revert "gutter: avoid connecting to GtkWidget::draw()" (2.59 KB, patch)
2016-06-02 17:33 UTC, Chris Mayo
committed Details | Review

Description Chris Mayo 2016-05-31 19:20:37 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.
Comment 1 Sébastien Wilmet 2016-06-01 08:43:53 UTC
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.
Comment 2 Chris Mayo 2016-06-01 18:57:10 UTC
meld-3.16.0 looks fine on Arch with gtksourceview3 3.20.3-1 and gtk3 3.20.6-1.
Comment 3 Sébastien Wilmet 2016-06-02 06:52:18 UTC
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.
Comment 4 Chris Mayo 2016-06-02 17:14:56 UTC
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.
Comment 5 Chris Mayo 2016-06-02 17:25:54 UTC
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
Comment 6 Chris Mayo 2016-06-02 17:33:41 UTC
Created attachment 328987 [details] [review]
Revert "gutter: avoid connecting to GtkWidget::draw()"

Third time lucky.
Comment 7 Sébastien Wilmet 2016-06-03 08:33:57 UTC
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.
Comment 8 Sébastien Wilmet 2016-06-03 10:36:45 UTC
Christian, can you look at it?
Comment 9 Christian Hergert 2016-06-03 15:06:20 UTC
Sure I'll take a look today
Comment 10 Sébastien Wilmet 2016-06-10 12:49:00 UTC
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.
Comment 11 Sébastien Wilmet 2016-06-10 13:21:26 UTC
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.
Comment 12 Christian Hergert 2016-06-10 19:03:18 UTC
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.
Comment 13 Sébastien Wilmet 2016-06-10 20:03:28 UTC
OK, so it's probably a bug in GTK+ 3.18, not worth investigating.