#1825 Fix several breakages on GTK 3.20

Bug
closed-fixed
5
2016-05-24
2016-04-27
No

GTK 3.20 broke (changed? matter of point of view) a lot of things affecting Scintilla, with various impact. Here are patches fixing the ones I know of:

  • Fix the autoc popup font. This is due to CSS theming sintax changes.
  • Fix an (harmless) warning when allocating the text area. That's GTK being pickier, but it's not crazy.
  • Fix the autoc popup size. This is due to CSS theming changes, where the border size we care about is not set on a new frame border node rather than directly inside frame.
  • Fix another autoc popup sizing issue spewing scary assertion failures (but doesn't visually impact appearance -- for now?). This is due to changes in the internal GtkScrolledWindow implementation not caping anymore with an allocation smaller than it expcetd originally. Fix this by ciomputing the actual size we want instead of considering 1px small enough (as we resize later anyway).
  • Fix harmless warning/debug messages fetching the frame's borders size. This is due to changes in GTK spewing those when looking up style values for a non-current state in some cases. The change here is simply using what the current state happens to be, which in practice is just what we had plus an additional direction (LTR in my case) flag. Just GTK being pickier than reasonable I guess.

4th patch fixes an unrelated memory leak on GTK3.

I tested all this on 3.20 (obviously), and on Ubuntu 15.10's GTK 3.16.7. I'm pretty confident the changes will work with any ealrier version too, or are properly guarded.

When reviewing, note that gtk_check_version() has a pretty unexpected return value: it returns NULL when the version is compatible (as it returns a descriptive string when not compatible).

6 Attachments

Related

Bugs: #1831

Discussion

  • Colomban Wendling

    Some also reported scrollbar not refreshing in some cases, but it seemed mostly random and I couldn't yet reproduce it for now. I also find it odd it'd be in Scintilla's side as here the code is pretty straightfoward if I believe. We'll see.

     
    • Neil Hodgson

      Neil Hodgson - 2016-04-30

      Scrollbar refresh is now supposed to be automatic and gtk_adjustment_changed has been deprecated. Its likely that gtk_adjustment_changed does nothing now and the automatic behaviour is relied upon. Its possible there are bugs in this automatic behaviour, possibly when the scrollbar position is being changed in an unexpected place such as in a paint handler.

       
  • Neil Hodgson

    Neil Hodgson - 2016-04-30
    • status: open --> open-fixed
    • assigned_to: Neil Hodgson
     
  • Neil Hodgson

    Neil Hodgson - 2016-05-24
    • status: open-fixed --> closed-fixed
     

Log in to post a comment.

Get latest updates about Open Source Projects, Conferences and News.

Sign up for the SourceForge newsletter:





No, thanks