]> git.eshelyaron.com Git - emacs.git/commitdiff
Handle deferred `event-kind' property when using unread-command-events.
authorChong Yidong <cyd@stupidchicken.com>
Sun, 10 Apr 2011 02:10:52 +0000 (22:10 -0400)
committerChong Yidong <cyd@stupidchicken.com>
Sun, 10 Apr 2011 02:10:52 +0000 (22:10 -0400)
* src/mouse.el (mouse-drag-mode-line-1): Make sure that if we push
mouse-2 into unread-command-events, it is interpreted correctly.

lisp/ChangeLog
lisp/mouse.el

index 9f7577fa829a1aa917a8b69f133999535e12d22a..a2ed50e4b6f4099d54ffa69c5b7716c5042b4c4f 100644 (file)
@@ -1,3 +1,8 @@
+2011-04-10  Chong Yidong  <cyd@stupidchicken.com>
+
+       * mouse.el (mouse-drag-mode-line-1): Make sure that if we push
+       mouse-2 into unread-command-events, it is interpreted correctly.
+
 2011-04-09  Chong Yidong  <cyd@stupidchicken.com>
 
        * image-mode.el (image-type, image-mode-map, image-minor-mode-map)
index bed4776c13590a4bfb0d7acaa8f13b0413282844..628f900e88674de32b1f1c6fe7b1ca3cfc6c622b 100644 (file)
@@ -538,6 +538,9 @@ MODE-LINE-P non-nil means dragging a mode line; nil means a header line."
         ;; a `drag-mouse-1'.  In any case `on-link' would have been nulled
         ;; above if there had been any significant mouse movement.
         (when (and on-link (eq 'mouse-1 (car-safe event)))
+         ;; If mouse-2 has never been done by the user, it doesn't
+         ;; have the necessary property to be interpreted correctly.
+         (put 'mouse-2 'event-kind 'mouse-click)
           (push (cons 'mouse-2 (cdr event)) unread-command-events))))))
 
 (defun mouse-drag-mode-line (start-event)