unofficial mirror of emacs-devel@gnu.org 
 help / color / mirror / code / Atom feed
From: Miles Bader <miles@gnu.org>
Cc: emacs-devel@gnu.org
Subject: Re: Emacs GTK scroll-bar flickering
Date: Tue, 18 Mar 2003 18:28:02 -0500	[thread overview]
Message-ID: <20030318232802.GA19990@gnu.org> (raw)
In-Reply-To: <200303182319.h2INJ0bP024745@stubby.bodenonline.com>

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...]

Thanks,

-Miles
-- 
`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_)

  parent reply	other threads:[~2003-03-18 23:28 UTC|newest]

Thread overview: 37+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2003-03-14  5:39 Emacs GTK scroll-bar flickering Miles Bader
2003-03-14 10:19 ` Kai Großjohann
2003-03-14 11:52   ` Andreas Schwab
2003-03-14 12:44     ` Kai Großjohann
2003-03-14 13:35       ` Miles Bader
2003-03-14 18:46         ` Jan D.
2003-03-14 20:04           ` Stefan Monnier
2003-03-14 20:35             ` Jan D.
2003-03-17  5:58           ` Miles Bader
2003-03-17 23:26             ` Jan D.
2003-03-18  1:33               ` Miles Bader
2003-03-18  5:39                 ` Jan D.
2003-03-18  6:15                   ` Miles Bader
2003-03-18  6:44                     ` Luc Teirlinck
2003-03-18  6:54                       ` Miles Bader
2003-03-18  7:05                         ` Luc Teirlinck
2003-03-18  7:56                           ` Miles Bader
2003-03-18  8:09                             ` Miles Bader
2003-03-19  8:48                           ` Richard Stallman
2003-03-18 22:15                     ` Jan D.
2003-03-18 22:42                       ` Kevin Rodgers
2003-03-19  6:05                         ` Jan D.
2003-03-18 23:28                       ` Miles Bader [this message]
2003-03-19  1:07                         ` Kim F. Storm
2003-03-19  1:26                           ` Miles Bader
2003-03-19 22:27                             ` Jan D.
2003-03-20  1:19                               ` Miles Bader
2003-03-21 19:06                               ` Richard Stallman
2003-03-26 18:17                                 ` Jan D.
2003-03-27  1:22                                   ` Miles Bader
2003-03-27  6:54                                     ` Miles Bader
2003-03-27 22:12                                       ` Richard Stallman
2003-03-28  1:29                                         ` Miles Bader
2003-03-29 18:38                                           ` Richard Stallman
2003-03-27 18:06                                     ` Jan D.
2003-03-27 19:04                                     ` Richard Stallman
2003-03-20  8:45                       ` Richard Stallman

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

  List information: https://www.gnu.org/software/emacs/

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20030318232802.GA19990@gnu.org \
    --to=miles@gnu.org \
    --cc=emacs-devel@gnu.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
Code repositories for project(s) associated with this public inbox

	https://git.savannah.gnu.org/cgit/emacs.git

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).