at commit 01002255
| 1 | ;;;; common lisp window manager |
| 2 | ;;;; |
| 3 | ;;;; sloppy focus-follows-mouse (don't unfocus on moving out) |
| 4 | |
| 5 | (in-package #:clwm-ext) |
| 6 | |
| 7 | (defclass sloppy-focus-follows-mouse-mixin () () |
| 8 | (:documentation |
| 9 | "Focus follows mouse, but entering the root doesn't unfocus.")) |
| 10 | |
| 11 | (defmethod client-event-mask append |
| 12 | ((wm sloppy-focus-follows-mouse-mixin) client) |
| 13 | '(:enter-window)) |
| 14 | |
| 15 | (defmethod handle-client-event |
| 16 | ((wm sloppy-focus-follows-mouse-mixin) client |
| 17 | (event-key (eql :enter-notify)) |
| 18 | &key mode kind) |
| 19 | (if (and (eql mode :normal) (not (eql kind :inferior))) |
| 20 | (focus-client wm client) |
| 21 | (call-next-method))) |