GNU bug report logs -
#10165
[PATCH] Allow setting corner in mouse avoidance mode.
Previous Next
Full log
View this message in rfc822 format
Use this, as there is an error in precedent patch (still using value of
old variable), sorry.
--8<---------------cut here---------------start------------->8---
(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 (case fra-or-win
(frame (list 0 0 (frame-width) (frame-height)))
(window (window-edges))))
(alist (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 (case side
(left '+)
(right '-)))
(top-or-bottom-fn (case 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
--8<---------------cut here---------------end--------------->8---
--
Thierry
Get my Gnupg key:
gpg --keyserver pgp.mit.edu --recv-keys 59F29997
This bug report was last modified 13 years and 43 days ago.
Previous Next
GNU bug tracking system
Copyright (C) 1999 Darren O. Benham,
1997,2003 nCipher Corporation Ltd,
1994-97 Ian Jackson.