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: 18 Mar 2003 15:15:25 +0900 Sender: emacs-devel-bounces+emacs-devel=quimby.gnus.org@gnu.org Message-ID: References: Reply-To: Miles Bader NNTP-Posting-Host: main.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-Trace: main.gmane.org 1047968236 13917 80.91.224.249 (18 Mar 2003 06:17:16 GMT) X-Complaints-To: usenet@main.gmane.org NNTP-Posting-Date: Tue, 18 Mar 2003 06:17:16 +0000 (UTC) Cc: emacs-devel@gnu.org Original-X-From: emacs-devel-bounces+emacs-devel=quimby.gnus.org@gnu.org Tue Mar 18 07:17:14 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 18vAPM-0003cE-00 for ; Tue, 18 Mar 2003 07:17:08 +0100 Original-Received: from monty-python.gnu.org ([199.232.76.173]) by quimby.gnus.org with esmtp (Exim 3.12 #1 (Debian)) id 18vAPU-0005VS-00 for ; Tue, 18 Mar 2003 07:17:16 +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 18vAOT-00073Q-04 for emacs-devel@quimby.gnus.org; Tue, 18 Mar 2003 01:16:13 -0500 Original-Received: from list by monty-python.gnu.org with tmda-scanned (Exim 4.10.13) id 18vAO8-000738-00 for emacs-devel@gnu.org; Tue, 18 Mar 2003 01:15:52 -0500 Original-Received: from mail by monty-python.gnu.org with spam-scanned (Exim 4.10.13) id 18vAO6-00072w-00 for emacs-devel@gnu.org; Tue, 18 Mar 2003 01:15:51 -0500 Original-Received: from tyo201.gate.nec.co.jp ([210.143.35.51]) by monty-python.gnu.org with esmtp (Exim 4.10.13) id 18vAO5-0006lw-00; Tue, 18 Mar 2003 01:15:49 -0500 Original-Received: from mailgate4.nec.co.jp ([10.7.69.195])h2I6FWw04675; Tue, 18 Mar 2003 15:15:32 +0900 (JST) Original-Received: (from root@localhost) by mailgate4.nec.co.jp (8.11.6/3.7W-MAILGATE-NEC) id h2I6FW129524; Tue, 18 Mar 2003 15:15:32 +0900 (JST) Original-Received: from edtmg05.lsi.nec.co.jp (edtmg05.edc.nec.co.jp [10.26.17.202]) by mailsv4.nec.co.jp (8.11.6/3.7W-MAILSV4-NEC) with ESMTP id h2I6FVH05493; Tue, 18 Mar 2003 15:15:31 +0900 (JST) Original-Received: from mcsss2.ucom.lsi.nec.co.jp (localhost [127.0.0.1]) PAA28274; Tue, 18 Mar 2003 15:15:30 +0900 (JST) Original-Received: from mcspd15.ucom.lsi.nec.co.jp (mcspd15 [10.30.114.174]) with ESMTP id h2I6FPNH020853; Tue, 18 Mar 2003 15:15:25 +0900 (JST) Original-Received: by mcspd15.ucom.lsi.nec.co.jp (Postfix, from userid 31295) id 857733700; Tue, 18 Mar 2003 15:15:25 +0900 (JST) Original-To: "Jan D." System-Type: i686-pc-linux-gnu Blat: Foop In-Reply-To: Original-Lines: 80 Original-cc: Kai Gro?johann 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:12427 X-Report-Spam: http://spam.gmane.org/gmane.emacs.devel:12427 "Jan D." 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 visible. I hope this can help a bit... -miles -- Suburbia: where they tear out the trees and then name streets after them.