emacs-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: address@hidden: Scroll bars]


From: Stefan Monnier
Subject: Re: address@hidden: Scroll bars]
Date: Mon, 02 Sep 2002 13:16:35 -0400

> 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: address@hidden, address@hidden
From: "Stefan Monnier" <address@hidden>
Date: Sat, 04 Dec 1999 21:54:50 -0500
Cc: "Stefan Monnier" <address@hidden>, address@hidden, address@hidden


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);
 }





reply via email to

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