diff options
author | Colin Okay <colin@cicadas.surf> | 2022-06-24 08:39:43 -0500 |
---|---|---|
committer | Colin Okay <colin@cicadas.surf> | 2022-06-24 08:39:43 -0500 |
commit | 622add17d99c909b582b175f5e8378f9888cca8a (patch) | |
tree | 3ad950a98b84de1f50198611d9403f499b511e84 /wheelwork.lisp | |
parent | d92ad0e6b07d55287179ea3f9584e4923c3f34f8 (diff) |
[modify] mousedown events default to the app itself
Diffstat (limited to 'wheelwork.lisp')
-rw-r--r-- | wheelwork.lisp | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/wheelwork.lisp b/wheelwork.lisp index fb4e5bb..3a39dd2 100644 --- a/wheelwork.lisp +++ b/wheelwork.lisp @@ -393,7 +393,9 @@ necessary." Additionally, if the APPLICATION's REFOCUS-ON-MOUSEDOWN-P is T, try to give focus to whatever was clicked." (destructuring-bind (x y) (screen-to-world wx wy) - (when-let (target (unit-under app x y)) + (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) (refocus-on target)) (when-let (handler (get-handler-for target 'mousedown)) |