all messages for Emacs-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
From: "Stefan Monnier" <monnier+gnu/emacs@rum.cs.yale.edu>
Cc: huug.at.gmane@xs4all.nl, emacs-devel@gnu.org
Subject: Re: [dane@mail.abcsinc.com: Scroll bars]
Date: Mon, 02 Sep 2002 13:16:35 -0400	[thread overview]
Message-ID: <200209021716.g82HGbA07627@rum.cs.yale.edu> (raw)
In-Reply-To: E17lef4-0003HL-00@fencepost.gnu.org

> 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" <monnier@cs.yale.edu>
Date: Sat, 04 Dec 1999 21:54:50 -0500
Cc: "Stefan Monnier" <monnier@cs.yale.edu>, 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);
 }

      reply	other threads:[~2002-09-02 17:16 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2002-08-17  4:50 [dane@mail.abcsinc.com: Scroll bars] Richard Stallman
2002-08-19 14:53 ` Stefan Monnier
2002-08-20 17:21   ` Richard Stallman
2002-08-21  6:44     ` Eli Zaretskii
     [not found]     ` <m21y8rg350.fsf@primate.xs4all.nl>
2002-08-22  8:08       ` Andreas Schwab
2002-08-24  2:32       ` Richard Stallman
     [not found]         ` <m2y9amslnp.fsf@primate.xs4all.nl>
2002-09-02  0:01           ` Richard Stallman
2002-09-02 17:16             ` Stefan Monnier [this message]

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

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

  git send-email \
    --in-reply-to=200209021716.g82HGbA07627@rum.cs.yale.edu \
    --to=monnier+gnu/emacs@rum.cs.yale.edu \
    --cc=emacs-devel@gnu.org \
    --cc=huug.at.gmane@xs4all.nl \
    /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 external index

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

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.