From: Stefan Monnier <monnier@iro.umontreal.ca>
To: 13979@debbugs.gnu.org
Subject: bug#13979: NS: scroll-bar not draggable
Date: Tue, 19 Mar 2013 08:41:13 -0400 [thread overview]
Message-ID: <jwvwqt3609f.fsf-monnier+emacs@gnu.org> (raw)
In-Reply-To: <CAJ+QY_HXTE3nkPK1Dw-d+boR_tCKb4HhiH6=NFqvv8+MJp0qUw@mail.gmail.com>
>>>>> 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.
next prev parent reply other threads:[~2013-03-19 12:41 UTC|newest]
Thread overview: 10+ messages / expand[flat|nested] mbox.gz Atom feed top
2013-03-16 19:37 bug#13979: 24.3.50; NS: scroll-bar not draggable Darren Hoo
2013-03-17 2:43 ` Stefan Monnier
2013-03-17 9:45 ` Jan Djärv
2013-03-17 11:02 ` Jan Djärv
2013-03-17 13:12 ` Stefan Monnier
2013-03-17 14:41 ` Jan D.
2013-03-17 15:37 ` Stefan Monnier
2013-03-18 17:23 ` Jan Djärv
2013-03-19 12:41 ` Stefan Monnier [this message]
2013-03-19 18:47 ` bug#13979: " Jan Djärv
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
List information: https://www.gnu.org/software/emacs/
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=jwvwqt3609f.fsf-monnier+emacs@gnu.org \
--to=monnier@iro.umontreal.ca \
--cc=13979@debbugs.gnu.org \
/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 public inbox
https://git.savannah.gnu.org/cgit/emacs.git
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).