[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Emacs-diffs] /srv/bzr/emacs/emacs-24 r110949: Fix follow-mouse clicks o
From: |
Chong Yidong |
Subject: |
[Emacs-diffs] /srv/bzr/emacs/emacs-24 r110949: Fix follow-mouse clicks on undraggable mode/header lines. |
Date: |
Sat, 24 Nov 2012 16:15:00 +0800 |
User-agent: |
Bazaar (2.5.0) |
------------------------------------------------------------
revno: 110949
fixes bug: http://debbugs.gnu.org/12971
committer: Chong Yidong <address@hidden>
branch nick: emacs-24
timestamp: Sat 2012-11-24 16:15:00 +0800
message:
Fix follow-mouse clicks on undraggable mode/header lines.
* mouse.el (mouse-drag-line): Even if the line is not draggable,
keep reading until we get the up-event anyway, in order to process
the up-event for mouse-1-click-follows-link.
modified:
lisp/ChangeLog
lisp/mouse.el
=== modified file 'lisp/ChangeLog'
--- a/lisp/ChangeLog 2012-11-23 21:49:13 +0000
+++ b/lisp/ChangeLog 2012-11-24 08:15:00 +0000
@@ -1,3 +1,9 @@
+2012-11-24 Chong Yidong <address@hidden>
+
+ * mouse.el (mouse-drag-line): Even if the line is not draggable,
+ keep reading until we get the up-event anyway, in order to process
+ the up-event for mouse-1-click-follows-link (Bug#12971).
+
2012-11-23 Stefan Monnier <address@hidden>
* emacs-lisp/bytecomp.el (byte-compile-file): Setup default value for
=== modified file 'lisp/mouse.el'
--- a/lisp/mouse.el 2012-10-26 09:11:24 +0000
+++ b/lisp/mouse.el 2012-11-24 08:15:00 +0000
@@ -425,7 +425,7 @@
(frame-parameters frame)))
'right)))
(draggable t)
- event position growth dragged)
+ finished event position growth dragged)
(cond
((eq line 'header)
;; Check whether header-line can be dragged at all.
@@ -457,7 +457,7 @@
;; Start tracking.
(track-mouse
;; Loop reading events and sampling the position of the mouse.
- (while draggable
+ (while (not finished)
(setq event (read-event))
(setq position (mouse-position))
;; Do nothing if
@@ -472,7 +472,7 @@
;; - there is a keyboard event or some other unknown event.
(cond
((not (consp event))
- (setq draggable nil))
+ (setq finished t))
((memq (car event) '(switch-frame select-window))
nil)
((not (memq (car event) '(mouse-movement scroll-bar-movement)))
@@ -480,15 +480,15 @@
;; Do not unread a drag-mouse-1 event to avoid selecting
;; some other window. For vertical line dragging do not
;; unread mouse-1 events either (but only if we dragged at
- ;; least once to allow mouse-1 clicks get through.
+ ;; least once to allow mouse-1 clicks get through).
(unless (and dragged
(if (eq line 'vertical)
(memq (car event) '(drag-mouse-1 mouse-1))
(eq (car event) 'drag-mouse-1)))
(push event unread-command-events)))
- (setq draggable nil))
- ((or (not (eq (car position) frame))
- (null (car (cdr position))))
+ (setq finished t))
+ ((not (and (eq (car position) frame)
+ (cadr position)))
nil)
((eq line 'vertical)
;; Drag vertical divider.
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- [Emacs-diffs] /srv/bzr/emacs/emacs-24 r110949: Fix follow-mouse clicks on undraggable mode/header lines.,
Chong Yidong <=