GNU bug report logs - #13979
24.3.50; NS: scroll-bar not draggable

Previous Next

Package: emacs;

Reported by: Darren Hoo <darren.hoo <at> gmail.com>

Date: Sat, 16 Mar 2013 19:40:02 UTC

Severity: normal

Found in version 24.3.50

Done: Jan Djärv <jan.h.d <at> swipnet.se>

Bug is archived. No further changes may be made.

Full log


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

From: Jan Djärv <jan.h.d <at> swipnet.se>
To: Stefan Monnier <monnier <at> iro.umontreal.ca>
Cc: 13979 <at> debbugs.gnu.org
Subject: Re: bug#13979: NS: scroll-bar not draggable
Date: Tue, 19 Mar 2013 19:47:40 +0100
It does.

	Jan D.

19 mar 2013 kl. 13:41 skrev Stefan Monnier <monnier <at> iro.umontreal.ca>:

>>>>>> Jan said:
>> On OSX the event produced when clicking below the handle looks like:
>> (down-mouse-1 (#<window 0x103229e50 on *info*> vertical-scroll-bar (0 . 428) 83281193 below-handle))
>> On Gtk3 it looks like:
>> (mouse-1 (#<window 0x11a0228 on *info*> vertical-scroll-bar (0 . 0) 0 below-handle))
> 
> So it seems that we need the patch below instead.  Can you try it (after
> removing your earlier patch) and confirm that it also fixes the problem?
> 
> 
>        Stefan
> 
> 
> === modified file 'lisp/subr.el'
> --- lisp/subr.el	2013-03-08 08:11:59 +0000
> +++ lisp/subr.el	2013-03-19 12:40:38 +0000
> @@ -1044,14 +1044,16 @@
> 		(nth 1 position))))
>     (and (symbolp area) area)))
> 
> -(defsubst posn-point (position)
> +(defun posn-point (position)
>   "Return the buffer location in POSITION.
> POSITION should be a list of the form returned by the `event-start'
> -and `event-end' functions."
> +and `event-end' functions.
> +Returns nil if POSITION does not correspond to any buffer location (e.g.
> +a click on a scroll bar)."
>   (or (nth 5 position)
> -      (if (consp (nth 1 position))
> -	  (car (nth 1 position))
> -	(nth 1 position))))
> +      (let ((pt (nth 1 position)))
> +        (or (car-safe pt)
> +            (if (integerp pt) pt)))))
> 
> (defun posn-set-point (position)
>   "Move point to POSITION.
> @@ -1124,12 +1126,14 @@
> and `event-end' functions."
>   (nth 3 position))
> 
> -(defsubst posn-string (position)
> +(defun posn-string (position)
>   "Return the string object of POSITION.
> Value is a cons (STRING . STRING-POS), or nil if not a string.
> POSITION should be a list of the form returned by the `event-start'
> and `event-end' functions."
> -  (nth 4 position))
> +  (let ((x (nth 4 position)))
> +    ;; Apparently this can also be `handle' or `below-handle' (bug#13979).
> +    (when (consp x) x)))
> 
> (defsubst posn-image (position)
>   "Return the image object of POSITION.
> 
> 
> 





This bug report was last modified 12 years and 69 days ago.

Previous Next


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