(defcustom tooltip-x-offset nil
- "Specify an X offset, in pixels, for the display of tooltips.
+ "X offset, in pixels, for the display of tooltips.
The offset is relative to the position of the mouse. It must
be chosen so that the tooltip window doesn't contain the mouse
when it pops up. If the value is nil, the default offset is 5
(defcustom tooltip-y-offset nil
- "Specify a Y offset, in pixels, for the display of tooltips.
+ "Y offset, in pixels, for the display of tooltips.
The offset is relative to the position of the mouse. It must
be chosen so that the tooltip window doesn't contain the mouse
when it pops up. If the value is nil, the default offset is -10
(tooltip-activate-mouse-motions nil))
(setq buffers (cdr buffers))))))
+(defvar tooltip-mouse-motions-active nil
+ "Locally t in a buffer if tooltip processing of mouse motion is enabled.")
(defun tooltip-activate-mouse-motions (activatep)
"Activate/deactivate mouse motion events for the current buffer.
ACTIVATEP non-nil means activate mouse motion events."
(if activatep
(progn
+ (make-local-variable 'tooltip-mouse-motions-active)
+ (setq tooltip-mouse-motions-active t)
(make-local-variable 'track-mouse)
(setq track-mouse t))
- (kill-local-variable 'track-mouse)))
-
+ (when tooltip-mouse-motions-active
+ (kill-local-variable 'tooltip-mouse-motions-active)
+ (kill-local-variable 'track-mouse))))
(defun tooltip-mouse-motion (event)
"Command handler for mouse movement events in `global-map'."