diff options
author | Colin Okay <colin@cicadas.surf> | 2022-06-27 10:43:04 -0500 |
---|---|---|
committer | Colin Okay <colin@cicadas.surf> | 2022-06-27 10:43:04 -0500 |
commit | 9c058339dde198062e96674c515ea946de5902b5 (patch) | |
tree | 67a3a925942db29bcfbd540f33aec6bdb6b84b35 /wheelwork.lisp | |
parent | bb1baae5c6c9ba1f1bba26696920e272df6bee85 (diff) |
[modify] get-focus & refocus-on: allow focus on not focusablep
Diffstat (limited to 'wheelwork.lisp')
-rw-r--r-- | wheelwork.lisp | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/wheelwork.lisp b/wheelwork.lisp index c03a444..952dd22 100644 --- a/wheelwork.lisp +++ b/wheelwork.lisp @@ -372,9 +372,9 @@ necessary." (defun refocus-on (target &optional (app *application*)) - "Sets focus of application to TARGET, if TARGET is focusable. " - (when (focusablep target) - (setf (application-focus app) target))) + "Sets focus of application to TARGET. This works whether or not +TARGET is FOCUSABLEP" + (setf (application-focus app) target)) (defun get-focus (&optional (app *application*)) (or (application-focus app) app)) @@ -428,7 +428,7 @@ give focus to whatever was clicked." (let ((target (or (unit-under app x y) ; if no unit is under the mouse, app))) ; then target the app itself - (when (refocus-on-mousedown-p app) + (when (and (refocus-on-mousedown-p app) (focusablep target)) (refocus-on target)) (when-let (handler (get-handler-for target 'mousedown)) (funcall handler target x y clicks button wx wy))))) |