#1567 Display is flashing when scrolling with Gtk+ 3

Bug
closed-fixed
nobody
5
2014-05-22
2014-01-05
No

The way drawing is handled has changed between Gtk+ 2 and Gtk+ 3. Scintilla is good with Gtk+ 2 but quite bad using Gtk+ 3.

One annoying point is the display flashing when the window is redrawn. It's especially annoying when moving in the text using the cursor keys.

Related

Bugs: #1625
Bugs: #1681
Bugs: #1949

Discussion

<< < 1 2 3 4 > >> (Page 3 of 4)
  • Neil Hodgson

    Neil Hodgson - 2014-02-04

    With this patch, I am seeing this effect where the scrollbars aren't being redrawn in SciTE after File | New. This occurs both in a VM and when used on a bare-machine install.
    Corrupted scrollbars
    This is a different appearance to earlier experiments with the original patch where I think the damage was to the text area. Trying to return to patch 1 now shows the same effect as the image. Perhaps I am misremembering or its a redraw propagation bug where which element is affected is determined by something not yet revealed like exposure order or similar.

    This system was last updated at start of January, although nothing in the system update queue appears related.

     
  • Colomban Wendling

    Doesn't work either here in Geany sorry (still GTK 3.8).

     
  • Sébastien Granjoux

    I have tried again in a virtual machine using mint 16 mate 64 bits but I still don't see the issue. The drawing is fine with and without my patch.

    I have looked at Gtk+ source code and indeed there is a difference between version 3.8.x and 3.9.x
    https://git.gnome.org/browse/gtk+/commit/gtk/gtkmain.c?id=d22fd7223c75f4720ddb982c659efb0d8d7543c4

    In the version 3.9, the draw signal is not called for double buffered non native window, this is why I need to call DrawText in the draw function of the Scintilla Widget.

    But on older version, the draw signal is called even for non native window. So with my patch the draw function of the text area is called two times: one time in the expose event of the text window and another time in the expose event of the scintilla window. It explains why it's working without my patch and perhaps it can explain the issue you see even if it's not clear.

    So, I can modify my patch to change something only with GTK 3.9 or greater.

     
  • Sébastien Granjoux

    Here is a patch that remove the redundant call to the draw function on older version of Gtk. Could you check if it makes a difference?

    There are other changes in Gtk around the one on the expose event. So it's quite possible that the issue is caused by something else but that's an easy check.

    If it doesn't work, I think I can remove the double buffering only on Gtk starting from version 3.9.2. It should fix the issue without breaking something. Could you check with gtk 3.9.2 or greater that the patch is working?

     
    • Neil Hodgson

      Neil Hodgson - 2014-02-11

      I don't have any GTK+ installations later the 3.8.x - I always wait for mainstream distributions before updating GTK+ as I spent far too much time in Scintilla's early days struggling with pre-release versions of GTK+.

      The scrollbar issue shown above is still occurring with this patch but I'm willing to ignore this (and stick with GTK+ 2.x as SciTE's default) if other downstreams prefer the patch. If Geany is made to work OK with the patch then I'll accept it. Otherwise it'll mean a #if choice between the two paths, which is a maintenance and documentation hassle.

       
    • Colomban Wendling

      I still don't get the initial draw in Geany with this (GTK 3.8).

       
      Last edit: Colomban Wendling 2014-02-17
      • Colomban Wendling

        OK, I just tried gtk3_avoid_flickering_2.patch with a compositing WM (mutter), and it worked. So I guess it's the difference between your tests and ours, you using a compositing WM that caches all draws in textures, and us using a non-compositing WM and then need draws when the X server wants them.

        Maybe your could try on your side with a non-compositing WM?

         
        Last edit: Colomban Wendling 2014-02-17
        • Sébastien Granjoux

          I have tried with a virtual machine using Mint 16 but indeed the virtual machine is run in a compositing WM so it could explain the difference.

          I will try without a compositing WM but not before next week.

           
      • Colomban Wendling

        OK, my distro updated from 3.8 to 3.10.7 and with this version your patches seem to work OK.

         
        Last edit: Colomban Wendling 2014-02-17
      • Colomban Wendling

        Ah, and now I have GTK 3.10.7, I do see some flickering without the patch, with and without a compositing WM (tho I see it most without).

        I'll check a bit more in the upcoming days.

         
        Last edit: Colomban Wendling 2014-02-17
<< < 1 2 3 4 > >> (Page 3 of 4)

Log in to post a comment.