# HG changeset patch # User Gerd Moellmann # Date 974552186 0 # Node ID 7d4c3fcd3421e931eee1024c39588f2386a8020a # Parent 30b4d35807972b4b67531e3365431cc4163031c0 (tooltip-x-offset, tooltip-y-offset): New user-options. (tooltip-show): Use the offsets. diff -r 30b4d3580797 -r 7d4c3fcd3421 lisp/tooltip.el --- a/lisp/tooltip.el Sat Nov 18 12:34:44 2000 +0000 +++ b/lisp/tooltip.el Sat Nov 18 12:56:26 2000 +0000 @@ -76,6 +76,28 @@ :group 'tooltip) +(defcustom tooltip-x-offset nil + "Specify an X offset 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." + :tag "X offset" + :type '(choice (const :tag "Default" nil) + (integer :tag "Offset" :value 1)) + :group 'tooltip) + + +(defcustom tooltip-y-offset nil + "Specify an Y offset 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." + :tag "Y offset" + :type '(choice (const :tag "Default" nil) + (integer :tag "Offset" :value 1)) + :group 'tooltip) + + (defcustom tooltip-frame-parameters '((name . "tooltip") (foreground-color . "black") @@ -284,7 +306,12 @@ "Show a tooltip window at the current mouse position displaying TEXT." (if tooltip-use-echo-area (message "%s" text) - (x-show-tip text (selected-frame) tooltip-frame-parameters))) + (x-show-tip text + (selected-frame) + tooltip-frame-parameters + nil + tooltip-x-offset + tooltip-y-offset))) (defun tooltip-hide (&optional ignored-arg) "Hide a tooltip, if one is displayed.