[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Emacs-diffs] Changes to emacs/lisp/msb.el,v
From: |
Chong Yidong |
Subject: |
[Emacs-diffs] Changes to emacs/lisp/msb.el,v |
Date: |
Tue, 20 Jun 2006 18:08:42 +0000 |
CVSROOT: /cvsroot/emacs
Module name: emacs
Changes by: Chong Yidong <cyd> 06/06/20 18:08:41
Index: msb.el
===================================================================
RCS file: /cvsroot/emacs/emacs/lisp/msb.el,v
retrieving revision 1.55
retrieving revision 1.56
diff -u -b -r1.55 -r1.56
--- msb.el 28 May 2006 03:58:47 -0000 1.55
+++ msb.el 20 Jun 2006 18:08:40 -0000 1.56
@@ -473,18 +473,21 @@
See the function `mouse-select-buffer' and the variable
`msb-menu-cond' for more information about how the menus are split."
(interactive "e")
- ;; If EVENT is a down-event, read and discard the
- ;; corresponding up-event.
- (and (eventp event)
- (memq 'down (event-modifiers event))
- (read-event))
(let ((old-window (selected-window))
- (window (posn-window (event-start event))))
+ (window (posn-window (event-start event)))
+ early-release)
(unless (framep window) (select-window window))
+ ;; This `sit-for' magically makes the menu stay up if the mouse
+ ;; button is released within 0.1 second.
+ (setq early-release (not (sit-for 0.1 t)))
(let ((buffer (mouse-select-buffer event)))
(if buffer
(switch-to-buffer buffer)
- (select-window old-window))))
+ (select-window old-window)))
+ ;; If the above `sit-for' was interrupted by a mouse-up, avoid
+ ;; generating a drag event.
+ (if (and early-release (memq 'down (event-modifiers last-input-event)))
+ (discard-input)))
nil)
;;;
@@ -995,9 +998,6 @@
;; adjust position
(setq posX (- posX (funcall msb-horizontal-shift-function))
position (list (list posX posY) posWind))))
- ;; This `sit-for' magically makes the menu stay up if the mouse
- ;; button is released within 0.1 second.
- (sit-for 0 100)
;; Popup the menu
(setq choice (x-popup-menu position msb--last-buffer-menu))
(cond
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- [Emacs-diffs] Changes to emacs/lisp/msb.el,v,
Chong Yidong <=