Function: mouse-avoidance-banish-destination
mouse-avoidance-banish-destination is a byte-compiled function defined
in avoid.el.gz.
Signature
(mouse-avoidance-banish-destination)
Documentation
The position to which Mouse Avoidance mode banish moves the mouse.
If you want the mouse banished to a different corner set
mouse-avoidance-banish-position as you need.
Source Code
;; Defined in /usr/src/emacs/lisp/avoid.el.gz
(defun mouse-avoidance-banish-destination ()
"The position to which Mouse Avoidance mode `banish' moves the mouse.
If you want the mouse banished to a different corner set
`mouse-avoidance-banish-position' as you need."
(let* ((fra-or-win (assoc-default
'frame-or-window
mouse-avoidance-banish-position 'eq))
(list-values (pcase fra-or-win
('frame (list 0 0 (frame-width) (frame-height)))
('window (window-edges))))
(alist (cl-loop for v in list-values
for k in '(left top right bottom)
collect (cons k v)))
(side (assoc-default
'side
mouse-avoidance-banish-position #'eq))
(side-dist (assoc-default
'side-pos
mouse-avoidance-banish-position #'eq))
(top-or-bottom (assoc-default
'top-or-bottom
mouse-avoidance-banish-position #'eq))
(top-or-bottom-dist (assoc-default
'top-or-bottom-pos
mouse-avoidance-banish-position #'eq))
(side-fn (pcase side
('left '+)
('right '-)))
(top-or-bottom-fn (pcase top-or-bottom
('top '+)
('bottom '-))))
(cons (funcall side-fn ; -/+
(assoc-default side alist 'eq) ; right or left
side-dist) ; distance from side
(funcall top-or-bottom-fn ; -/+
(assoc-default top-or-bottom alist 'eq) ; top/bottom
top-or-bottom-dist)))) ; distance from top/bottom