From mboxrd@z Thu Jan 1 00:00:00 1970 Path: main.gmane.org!not-for-mail From: Miles Bader Newsgroups: gmane.emacs.devel Subject: Re: Emacs GTK scroll-bar flickering Date: Tue, 18 Mar 2003 18:28:02 -0500 Sender: emacs-devel-bounces+emacs-devel=quimby.gnus.org@gnu.org Message-ID: <20030318232802.GA19990@gnu.org> References: <200303182319.h2INJ0bP024745@stubby.bodenonline.com> NNTP-Posting-Host: main.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-Trace: main.gmane.org 1048030254 22843 80.91.224.249 (18 Mar 2003 23:30:54 GMT) X-Complaints-To: usenet@main.gmane.org NNTP-Posting-Date: Tue, 18 Mar 2003 23:30:54 +0000 (UTC) Cc: emacs-devel@gnu.org Original-X-From: emacs-devel-bounces+emacs-devel=quimby.gnus.org@gnu.org Wed Mar 19 00:30:51 2003 Return-path: Original-Received: from quimby.gnus.org ([80.91.224.244]) by main.gmane.org with esmtp (Exim 3.35 #1 (Debian)) id 18vQXj-0005w9-00 for ; Wed, 19 Mar 2003 00:30:51 +0100 Original-Received: from monty-python.gnu.org ([199.232.76.173]) by quimby.gnus.org with esmtp (Exim 3.12 #1 (Debian)) id 18vQYD-000129-00 for ; Wed, 19 Mar 2003 00:31:21 +0100 Original-Received: from localhost ([127.0.0.1] helo=monty-python.gnu.org) by monty-python.gnu.org with esmtp (Exim 4.10.13) id 18vQWx-0006ED-08 for emacs-devel@quimby.gnus.org; Tue, 18 Mar 2003 18:30:03 -0500 Original-Received: from list by monty-python.gnu.org with tmda-scanned (Exim 4.10.13) id 18vQWg-0006By-00 for emacs-devel@gnu.org; Tue, 18 Mar 2003 18:29:46 -0500 Original-Received: from mail by monty-python.gnu.org with spam-scanned (Exim 4.10.13) id 18vQWf-0006Bh-00 for emacs-devel@gnu.org; Tue, 18 Mar 2003 18:29:45 -0500 Original-Received: from fencepost.gnu.org ([199.232.76.164]) by monty-python.gnu.org with esmtp (Exim 4.10.13) id 18vQV1-0005ix-00 for emacs-devel@gnu.org; Tue, 18 Mar 2003 18:28:03 -0500 Original-Received: from miles by fencepost.gnu.org with local (Exim 4.10) id 18vQV0-0005Wj-00; Tue, 18 Mar 2003 18:28:02 -0500 Original-To: "Jan D." Content-Disposition: inline In-Reply-To: <200303182319.h2INJ0bP024745@stubby.bodenonline.com> User-Agent: Mutt/1.3.28i Blat: Foop X-BeenThere: emacs-devel@gnu.org X-Mailman-Version: 2.1b5 Precedence: list List-Id: Emacs development discussions. List-Help: List-Post: List-Subscribe: , List-Archive: List-Unsubscribe: , Errors-To: emacs-devel-bounces+emacs-devel=quimby.gnus.org@gnu.org Xref: main.gmane.org gmane.emacs.devel:12451 X-Report-Spam: http://spam.gmane.org/gmane.emacs.devel:12451 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_)