From mboxrd@z Thu Jan 1 00:00:00 1970 Path: main.gmane.org!not-for-mail From: "Stefan Monnier" Newsgroups: gmane.emacs.devel Subject: Re: [dane@mail.abcsinc.com: Scroll bars] Date: Mon, 02 Sep 2002 13:16:35 -0400 Sender: emacs-devel-admin@gnu.org Message-ID: <200209021716.g82HGbA07627@rum.cs.yale.edu> References: <200208170450.g7H4ovd08634@wijiji.santafe.edu> <200208191453.g7JErRv13421@rum.cs.yale.edu> <200208201721.g7KHLNV09768@wijiji.santafe.edu> <200208240232.g7O2WOl11542@wijiji.santafe.edu> NNTP-Posting-Host: localhost.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-Trace: main.gmane.org 1030986979 20503 127.0.0.1 (2 Sep 2002 17:16:19 GMT) X-Complaints-To: usenet@main.gmane.org NNTP-Posting-Date: Mon, 2 Sep 2002 17:16:19 +0000 (UTC) Cc: huug.at.gmane@xs4all.nl, emacs-devel@gnu.org Return-path: Original-Received: from quimby.gnus.org ([80.91.224.244]) by main.gmane.org with esmtp (Exim 3.35 #1 (Debian)) id 17luoE-0005Ka-00 for ; Mon, 02 Sep 2002 19:16:18 +0200 Original-Received: from monty-python.gnu.org ([199.232.76.173]) by quimby.gnus.org with esmtp (Exim 3.12 #1 (Debian)) id 17lvMX-0003zE-00 for ; Mon, 02 Sep 2002 19:51:45 +0200 Original-Received: from localhost ([127.0.0.1] helo=monty-python.gnu.org) by monty-python.gnu.org with esmtp (Exim 4.10) id 17lupj-0001Wi-00; Mon, 02 Sep 2002 13:17:51 -0400 Original-Received: from list by monty-python.gnu.org with tmda-scanned (Exim 4.10) id 17luoa-0001Qi-00 for emacs-devel@gnu.org; Mon, 02 Sep 2002 13:16:40 -0400 Original-Received: from mail by monty-python.gnu.org with spam-scanned (Exim 4.10) id 17luoY-0001QS-00 for emacs-devel@gnu.org; Mon, 02 Sep 2002 13:16:40 -0400 Original-Received: from rum.cs.yale.edu ([128.36.229.169]) by monty-python.gnu.org with esmtp (Exim 4.10) id 17luoY-0001QM-00; Mon, 02 Sep 2002 13:16:38 -0400 Original-Received: (from monnier@localhost) by rum.cs.yale.edu (8.11.6/8.11.6) id g82HGbA07627; Mon, 2 Sep 2002 13:16:37 -0400 X-Mailer: exmh version 2.4 06/23/2000 with nmh-1.0.4 Original-To: Richard Stallman Errors-To: emacs-devel-admin@gnu.org X-BeenThere: emacs-devel@gnu.org X-Mailman-Version: 2.0.11 Precedence: bulk List-Help: List-Post: List-Subscribe: , List-Id: Emacs development discussions. List-Unsubscribe: , List-Archive: Xref: main.gmane.org gmane.emacs.devel:7339 X-Report-Spam: http://spam.gmane.org/gmane.emacs.devel:7339 > I will try convincing Red Hat to compile with -DARROW_SCROLLBAR. If you could also convince them (and Debian) to apply the following patch, it would make the scrolling *much* smoother. Stefan Subject: annoying bug in Xaw3d To: kaleb@x.org, bugs@redhat.com From: "Stefan Monnier" Date: Sat, 04 Dec 1999 21:54:50 -0500 Cc: "Stefan Monnier" , kojima@inf.ufrgs.br, bb@zip.com.au Xaw3d (at least version 1.3) has the nasty habit of ignoring XawScrollbarSetThumb requests while dragging the thumb. It also has the annoying idea of preventing the application from moving the thumb past `1.0 - scrollbar.shown' (i.e. prevent it from shrinking at the end) which might be OK for several applications but not for programs like Emacs where the shrinking at the end is exactly what we want. Working around those two restrictions is a severe pain in the ass and I have no idea why this code was added in the first place. In any case, I've been using the patch below for some time now without observing any undesirable behavior. I have the strong impression that such behavior will not appear since the patch makes Xaw3d behave more like Xaw (what programs expect). Without this patch, Emacs' scrollbar (when using Xaw-style scrollbars) behaves very poorly when reaching the end of the buffer although I've already done my best to add kludges to Emacs to work around the problem. This problem probably appears in most Xaw3d derivatives. Stefan Index: Scrollbar.c =================================================================== RCS file: /home/monnier/cvsroot/XawM/Scrollbar.c,v retrieving revision 1.1.1.1 diff -u -r1.1.1.1 Scrollbar.c --- Scrollbar.c 1999/12/05 01:54:00 1.1.1.1 +++ Scrollbar.c 1999/12/05 02:04:45 @@ -1323,9 +1323,6 @@ sbw->scrollbar.top = loc - sbw->scrollbar.picked; if (sbw->scrollbar.top < 0.0) sbw->scrollbar.top = 0.0; } - /* don't allow scrollbar to shrink at end */ - if (sbw->scrollbar.top + sbw->scrollbar.shown > 1.0) - sbw->scrollbar.top = 1.0 - sbw->scrollbar.shown + 0.001; #ifdef ARROW_SCROLLBAR sbw->scrollbar.scroll_mode = SMODE_TRACK; /* indicate continuous scroll */ #endif @@ -1406,22 +1403,11 @@ w,top,shown); #endif -#ifdef ARROW_SCROLLBAR - if (sbw->scrollbar.scroll_mode == (char) SMODE_TRACK) /* if still thumbing */ - return; -#else - if (sbw->scrollbar.direction == 'c') return; /* if still thumbing */ -#endif - sbw->scrollbar.top = (top > 1.0) ? 1.0 : (top >= 0.0) ? top : sbw->scrollbar.top; sbw->scrollbar.shown = (shown > 1.0) ? 1.0 : (shown >= 0.0) ? shown : sbw->scrollbar.shown; - - /* don't allow scrollbar to shrink at end */ - if (sbw->scrollbar.top + sbw->scrollbar.shown > 1.0) - sbw->scrollbar.top = 1.0 - sbw->scrollbar.shown + 0.001; PaintThumb (sbw, 0); }