[Top][All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Emacs GTK scroll-bar flickering

From: Miles Bader
Subject: Re: Emacs GTK scroll-bar flickering
Date: 18 Mar 2003 15:15:25 +0900

"Jan D." <address@hidden> writes:
> > I tried today's CVS; it's a bit hard to tell -- maybe the number of
> > full-redraws on each buffer change is less, but the overall feel is
> > roughly the same (painful).
> You must have a very complicated theme or a very slow machine, I can't
> see this at all.

I think my usual theme is slower than most, but this effect happens even
with the default Gnome theme; one standard theme that seems to show it
pretty well is the `Crux' theme (this is available as a package in
Debian, I'm not sure about other distros).  The `Geramik' theme shows
the effect even better, but I think it's less common(?).

My machine is a fairly standard current PC-type (1GHz PIII, 256MB RAM,
I810 MB/graphics chipset, running XFree86 4.2.1, libgtk 2.2.1).

> Are you sure you updated CVS?

Yup; I tried another `cvs update' just now to make sure, and everything
seems up-to-date.

> Emacs does not "redraw" the scroll bars ever, it just tells GTK what
> values to use for the scroll bars.  The desicion to redraw is in GTK
> entirely.  GTK redraws scroll bars by clearing all and then redraw,
> which is very primitive.

Hmmm, then maybe something is wrong with GTK then, or somehow it's
getting confused by emacs; perhaps it's my GTK installation (standard
Debian unstable)?

> Emacs probably changes thumb much more than Gedit, as Gedit counts
> lines visible, but Emacs counts characters.

That's not the issue, I think -- with exactly the same file and theme,
I can drag the scrollbar around in Gedit with _no_ flickering or other
unpleasant artifacts, whereas emacs flickers like crazy in the same test.

Here's an attempt to be a bit more specific about a case wehre I'm
seeing the problem:

 (1) Somehow pick the Crux GTK theme; the problem will show up with the
     default theme too, but less noticably.

     I think one thing that makes the Crux theme a good test that it has
     a fairly strong contrast between the color of the scrollbar thumb
     and the color of the trough -- so complete redraws become pretty
     obvious (because they draw the trough and then the thumb on top).

 (2) Do:
        xrdb < /dev/null        # or rename .Xdefaults if you use that
        emacs -q &

 (3) OK, now you should see the scratch buffer, with the standard 3-line
     comment at the beginning.  Go to the end of the buffer, and start
     typing random characters.

 (4) The result I see is:

    (a) Until your typing reaches the end of the line, the scrollbar is
        quite stable, with no obvious flickering.

    (b) When the typing reaches the end of the line, and continues onto
        the next line, the scrollbar starts flickering obviously, and
        will continue as you type.

        [Note that the flickering happens in other situations too, not
        just line-wrapping cases; however, this one is particularly
        easy to reproduce.]
        BTW, another odd thing: in the initial scratch-buffer, the
        scrollbar thumb doesn't extend all the way to the top and the
        bottom of the scrollbar, even though the entire is clearly

I hope this can help a bit...

Suburbia: where they tear out the trees and then name streets after them.

reply via email to

[Prev in Thread] Current Thread [Next in Thread]