GNU bug report logs - #29053
26.0.90: scroller cannot be dragged to bottom of window

Previous Next

Package: emacs;

Reported by: charles <at> aurox.ch (Charles A. Roelli)

Date: Sun, 29 Oct 2017 12:00:02 UTC

Severity: normal

Found in version 26.0.90

Done: charles <at> aurox.ch (Charles A. Roelli)

Bug is archived. No further changes may be made.

To add a comment to this bug, you must first unarchive it, by sending
a message to control AT debbugs.gnu.org, with unarchive 29053 in the body.
You can then email your comments to 29053 AT debbugs.gnu.org in the normal way.

Toggle the display of automated, internal messages from the tracker.

View this report as an mbox folder, status mbox, maintainer mbox


Report forwarded to bug-gnu-emacs <at> gnu.org:
bug#29053; Package emacs. (Sun, 29 Oct 2017 12:00:02 GMT) Full text and rfc822 format available.

Acknowledgement sent to charles <at> aurox.ch (Charles A. Roelli):
New bug report received and forwarded. Copy sent to bug-gnu-emacs <at> gnu.org. (Sun, 29 Oct 2017 12:00:02 GMT) Full text and rfc822 format available.

Message #5 received at submit <at> debbugs.gnu.org (full text, mbox):

From: charles <at> aurox.ch (Charles A. Roelli)
To: bug-gnu-emacs <at> gnu.org
Subject: 26.0.90: scroller cannot be dragged to bottom of window
Date: Sun, 29 Oct 2017 13:00:14 +0100
With 25.3 under macOS 10.6, from -q:

C-x C-f src/xdisp.c RET

I drag the vertical scroller from its top position (corresponding to
the start of the buffer) down to its lowest (corresponding to end of
buffer), and the mode line says "Bot L33113" and the last line of the
buffer is shown.

In comparison, when doing the same from 26.0.90 (a recent build --
4189d0e, 2017-10-29), the scrolling lags about 2 seconds behind
(possibly another issue), and I cannot bring the scroller to the
bottom of the window -- I only reach "98% L32461".  Actually, the
mouse pointer tracking seems to be off by some vertical pixel offset,
such that if I click and drag the scroller, when the mouse pointer
reaches halfway down the scroll bar, the scroller is not under it, but
only 40% or 45% down.

Other ways to scroll the text up (thus bringing the scroller down
where it cannot be dragged), such as clicking in the area underneath
the scroller, and clicking the scroll bar down arrow, work fine.




Information forwarded to bug-gnu-emacs <at> gnu.org:
bug#29053; Package emacs. (Sun, 29 Oct 2017 12:23:02 GMT) Full text and rfc822 format available.

Message #8 received at 29053 <at> debbugs.gnu.org (full text, mbox):

From: Eli Zaretskii <eliz <at> gnu.org>
To: charles <at> aurox.ch (Charles A. Roelli)
Cc: 29053 <at> debbugs.gnu.org
Subject: Re: bug#29053: 26.0.90: scroller cannot be dragged to bottom of window
Date: Sun, 29 Oct 2017 14:22:06 +0200
> Date: Sun, 29 Oct 2017 13:00:14 +0100
> From: charles <at> aurox.ch (Charles A. Roelli)
> 
> In comparison, when doing the same from 26.0.90 (a recent build --
> 4189d0e, 2017-10-29), the scrolling lags about 2 seconds behind
> (possibly another issue)

Almost certainly another issue.  It is best to visit the file with
find-file-literally to be sure.

> and I cannot bring the scroller to the
> bottom of the window -- I only reach "98% L32461".  Actually, the
> mouse pointer tracking seems to be off by some vertical pixel offset,
> such that if I click and drag the scroller, when the mouse pointer
> reaches halfway down the scroll bar, the scroller is not under it, but
> only 40% or 45% down.

This seems to be toolkit-specific -- on MS-Windows, I see no such
issues: I can scroll to the last line and even beyond (the last
display is with EOB on the topmost line).




Information forwarded to bug-gnu-emacs <at> gnu.org:
bug#29053; Package emacs. (Sun, 29 Oct 2017 12:57:02 GMT) Full text and rfc822 format available.

Message #11 received at 29053 <at> debbugs.gnu.org (full text, mbox):

From: charles <at> aurox.ch (Charles A. Roelli)
To: Eli Zaretskii <eliz <at> gnu.org>
Cc: 29053 <at> debbugs.gnu.org
Subject: Re: bug#29053: 26.0.90: scroller cannot be dragged to bottom of window
Date: Sun, 29 Oct 2017 13:56:56 +0100
> Date: Sun, 29 Oct 2017 14:22:06 +0200
> From: Eli Zaretskii <eliz <at> gnu.org>
> CC: 29053 <at> debbugs.gnu.org
> Reply-to: Eli Zaretskii <eliz <at> gnu.org>
> 
> > Date: Sun, 29 Oct 2017 13:00:14 +0100
> > From: charles <at> aurox.ch (Charles A. Roelli)
> > 
> > In comparison, when doing the same from 26.0.90 (a recent build --
> > 4189d0e, 2017-10-29), the scrolling lags about 2 seconds behind
> > (possibly another issue)
> 
> Almost certainly another issue.  It is best to visit the file with
> find-file-literally to be sure.

Thanks for suggesting that.  There is no scroll lag when visiting the
file literally, and the main issue introduced in this bug report
persists.

> > and I cannot bring the scroller to the
> > bottom of the window -- I only reach "98% L32461".  Actually, the
> > mouse pointer tracking seems to be off by some vertical pixel offset,
> > such that if I click and drag the scroller, when the mouse pointer
> > reaches halfway down the scroll bar, the scroller is not under it, but
> > only 40% or 45% down.
> 
> This seems to be toolkit-specific -- on MS-Windows, I see no such
> issues: I can scroll to the last line and even beyond (the last
> display is with EOB on the topmost line).

Under NS I had the same behavior until 26.0.90.  I will bisect to see
where the problem was introduced.




Information forwarded to bug-gnu-emacs <at> gnu.org:
bug#29053; Package emacs. (Tue, 31 Oct 2017 21:12:01 GMT) Full text and rfc822 format available.

Message #14 received at 29053 <at> debbugs.gnu.org (full text, mbox):

From: charles <at> aurox.ch (Charles A. Roelli)
To: charles <at> aurox.ch (Charles A. Roelli)
Cc: eliz <at> gnu.org, 29053 <at> debbugs.gnu.org
Subject: Re: bug#29053: 26.0.90: scroller cannot be dragged to bottom of window
Date: Tue, 31 Oct 2017 22:12:47 +0100
Seems that reverting this commit removes the issue:

  commit e683a2570be6f2e4f8defa4e7ee35a7d87f18918
  Author: Alan Third <alan <at> idiocy.org>
  Ref:    tags/emacs-26.0.90~2038
  Date:   Sun May 1 13:04:07 2016 +0200

  Implement horizontal scroll bars on NS

  * lisp/scroll-bar.el (horizontal-scroll-bars-available-p): Remove NS
  check.
  * lisp/term/ns-win.el: Remove custom NS scroll-bar handlers and bind
  scroll-bar mouse clicks to standard handlers.
  * src/nsterm.h (EmacsScroller): Add 'horizontal' property and rename
  pixel_height to pixel_length.
  * src/nsterm.m (x_set_window_size): Remove left-hand scroll-bar code. It
  caused scroll-bars to be over-drawn and the best working solution
  appears to be complete removal.
  (ns_set_horizontal_scroll_bar): Rewrite to handle horizontal scrollers
  correctly.
  (ns_set_vertical_scroll_bar): Set width to actual scroller width.
  (setFrame): Handle horizontal case.
  (dealloc): Handle horizontal case.
  (judge): Handle horizontal case.
  (setPosition): Rename pixel_height to pixel_length.
  (sendScrollEventAtLoc): Handle horizontal case.
  (mouseDown): Handle horizontal case and general tidy up of code.
  (mouseDragged): Handle horizontal case. Call sendScrollEventAtLoc with
  absolute pixel size instead of ratio.
  * src/window.h: Remove NS check.

macOS 10.6 is probably a special case.




Information forwarded to bug-gnu-emacs <at> gnu.org:
bug#29053; Package emacs. (Wed, 01 Nov 2017 16:53:02 GMT) Full text and rfc822 format available.

Message #17 received at 29053 <at> debbugs.gnu.org (full text, mbox):

From: Alan Third <alan <at> idiocy.org>
To: "Charles A. Roelli" <charles <at> aurox.ch>
Cc: 29053 <at> debbugs.gnu.org
Subject: Re: bug#29053: 26.0.90: scroller cannot be dragged to bottom of window
Date: Wed, 1 Nov 2017 16:52:34 +0000
On Tue, Oct 31, 2017 at 10:12:47PM +0100, Charles A. Roelli wrote:
>   (mouseDragged): Handle horizontal case. Call sendScrollEventAtLoc with
>   absolute pixel size instead of ratio.

The problem is most likely in here.

> macOS 10.6 is probably a special case.

Possibly, it seems to work fine here.

Does 10.6 have buttons to click at the top and/or bottom of the
scrollbar? If so they might affect the offset.
-- 
Alan Third




Information forwarded to bug-gnu-emacs <at> gnu.org:
bug#29053; Package emacs. (Wed, 01 Nov 2017 20:43:01 GMT) Full text and rfc822 format available.

Message #20 received at 29053 <at> debbugs.gnu.org (full text, mbox):

From: charles <at> aurox.ch (Charles A. Roelli)
To: Alan Third <alan <at> idiocy.org>
Cc: 29053 <at> debbugs.gnu.org
Subject: Re: bug#29053: 26.0.90: scroller cannot be dragged to bottom of window
Date: Wed, 01 Nov 2017 21:43:46 +0100
> Date: Wed, 1 Nov 2017 16:52:34 +0000
> From: Alan Third <alan <at> idiocy.org>
> 
> On Tue, Oct 31, 2017 at 10:12:47PM +0100, Charles A. Roelli wrote:
> >   (mouseDragged): Handle horizontal case. Call sendScrollEventAtLoc with
> >   absolute pixel size instead of ratio.
> 
> The problem is most likely in here.

Thanks for looking into it.

> > macOS 10.6 is probably a special case.
> 
> Possibly, it seems to work fine here.
> 
> Does 10.6 have buttons to click at the top and/or bottom of the
> scrollbar? If so they might affect the offset.

It has two buttons (up and down), at the bottom of the scrollbar.
When I drag the scroller as far down as possible, the distance between
the bottom of the scroller and the pointer (which should be zero)
looks about the same as the total height of the two buttons, so I
think you're right.

> -- 
> Alan Third
> 




Information forwarded to bug-gnu-emacs <at> gnu.org:
bug#29053; Package emacs. (Thu, 02 Nov 2017 22:55:02 GMT) Full text and rfc822 format available.

Message #23 received at 29053 <at> debbugs.gnu.org (full text, mbox):

From: Alan Third <alan <at> idiocy.org>
To: "Charles A. Roelli" <charles <at> aurox.ch>
Cc: 29053 <at> debbugs.gnu.org
Subject: Re: bug#29053: 26.0.90: scroller cannot be dragged to bottom of window
Date: Thu, 2 Nov 2017 22:54:25 +0000
On Wed, Nov 01, 2017 at 09:43:46PM +0100, Charles A. Roelli wrote:
> > Date: Wed, 1 Nov 2017 16:52:34 +0000
> > From: Alan Third <alan <at> idiocy.org>
> > 
> > On Tue, Oct 31, 2017 at 10:12:47PM +0100, Charles A. Roelli wrote:
> > >   (mouseDragged): Handle horizontal case. Call sendScrollEventAtLoc with
> > >   absolute pixel size instead of ratio.
> > 
> > The problem is most likely in here.
<snip>
> > 
> > Does 10.6 have buttons to click at the top and/or bottom of the
> > scrollbar? If so they might affect the offset.
> 
> It has two buttons (up and down), at the bottom of the scrollbar.
> When I drag the scroller as far down as possible, the distance between
> the bottom of the scroller and the pointer (which should be zero)
> looks about the same as the total height of the two buttons, so I
> think you're right.

It was this. Emacs expects the scroller slot to be the same number of
pixels as the whole scroller takes up. When there are buttons within
the scroller area then the slot is smaller.

On modern macOS versions because there are no buttons the use of a
ratio looked silly, but when there are buttons (like on GNUstep too)
then the ratio makes more sense. I shouldn’t have changed it.

I’ve pushed a fix. It works on GNUstep, so I expect it will work for
you too.
-- 
Alan Third




Reply sent to charles <at> aurox.ch (Charles A. Roelli):
You have taken responsibility. (Sat, 04 Nov 2017 09:56:02 GMT) Full text and rfc822 format available.

Notification sent to charles <at> aurox.ch (Charles A. Roelli):
bug acknowledged by developer. (Sat, 04 Nov 2017 09:56:02 GMT) Full text and rfc822 format available.

Message #28 received at 29053-done <at> debbugs.gnu.org (full text, mbox):

From: charles <at> aurox.ch (Charles A. Roelli)
To: Alan Third <alan <at> idiocy.org>
Cc: 29053-done <at> debbugs.gnu.org
Subject: Re: bug#29053: 26.0.90: scroller cannot be dragged to bottom of window
Date: Sat, 04 Nov 2017 10:57:12 +0100
> Date: Thu, 2 Nov 2017 22:54:25 +0000
> From: Alan Third <alan <at> idiocy.org>
> 
> On Wed, Nov 01, 2017 at 09:43:46PM +0100, Charles A. Roelli wrote:
> > > Date: Wed, 1 Nov 2017 16:52:34 +0000
> > > From: Alan Third <alan <at> idiocy.org>
> > > 
> > > On Tue, Oct 31, 2017 at 10:12:47PM +0100, Charles A. Roelli wrote:
> > > >   (mouseDragged): Handle horizontal case. Call sendScrollEventAtLoc with
> > > >   absolute pixel size instead of ratio.
> > > 
> > > The problem is most likely in here.
> <snip>
> > > 
> > > Does 10.6 have buttons to click at the top and/or bottom of the
> > > scrollbar? If so they might affect the offset.
> > 
> > It has two buttons (up and down), at the bottom of the scrollbar.
> > When I drag the scroller as far down as possible, the distance between
> > the bottom of the scroller and the pointer (which should be zero)
> > looks about the same as the total height of the two buttons, so I
> > think you're right.
> 
> It was this. Emacs expects the scroller slot to be the same number of
> pixels as the whole scroller takes up. When there are buttons within
> the scroller area then the slot is smaller.
> 
> On modern macOS versions because there are no buttons the use of a
> ratio looked silly, but when there are buttons (like on GNUstep too)
> then the ratio makes more sense. I shouldn’t have changed it.
> 
> I’ve pushed a fix. It works on GNUstep, so I expect it will work for
> you too.
> -- 
> Alan Third

Thanks very much Alan, it now works well.  I'm closing the bug.




bug archived. Request was from Debbugs Internal Request <help-debbugs <at> gnu.org> to internal_control <at> debbugs.gnu.org. (Sat, 02 Dec 2017 12:24:07 GMT) Full text and rfc822 format available.

This bug report was last modified 7 years and 202 days ago.

Previous Next


GNU bug tracking system
Copyright (C) 1999 Darren O. Benham, 1997,2003 nCipher Corporation Ltd, 1994-97 Ian Jackson.