[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: Tue, 18 Mar 2003 18:28:02 -0500
User-agent: Mutt/1.3.28i

On Tue, Mar 18, 2003 at 11:15:04PM +0100, Jan D. wrote:
> > 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.
> It indeed is the issue.  Where Gedit counts the lines in a file and
> the lines shown, Emacs counts characters.
> Thus, Emacs updates the thumb a lot more than a
> line based application.  When the scroll bar is bad at updating
> for small changes like this, flicker occurs.

I'm completely confused by your reasoning here.  I agree that emacs will
update the thumb more _often_ because of the lines vs. characters thing, but
what I was trying to say is that _even when_ the scrollbar gets updated in
(e.g.) gedit, it doesn't `flicker' (that is, it is redrawn with no obvious
visual clutter), whereas when a similar update happens in emacs, it _does_
flicker (the redraw, even for small changes, is very obvious).  IOW, for a
_single_ change-the-scroll-bar event, gedit's scrollbar will be updated
nicely, but emacs' will be updated distractingly.

I'd think that as far as the scrollbar code is concerned, the two cases
should be the same -- after all, the scrollbar is going to get a bunch of
numbers, and not know what they correspond to.

One case I can think of that might cause a difference is if the GTK scrollbar
code were bad at dealing with changes in total size of the range (which would
change every time you typed a character in emacs, but only when you type a
new line in gedit).  However, the emacs flicker can happen even in cases
where nothing changes, for instance, I can make it happen just by dragging
the scrollbar thumb around.

Is there something about the particular pattern of numbers that emacs feeds
to the scrollbar that confuses it?  Do you have a handle on exactly what it
is?  [If nothing else, I'd like to send a bug report to the GTK people...]


`Cars give people wonderful freedom and increase their opportunities.
 But they also destroy the environment, to an extent so drastic that
 they kill all social life' (from _A Pattern Language_)

reply via email to

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