Add a menu entry to enable sloppy-select-window focus policy
authorPhilippe Brochard <pbrochard@common-lisp.net>
Fri, 5 Apr 2013 20:12:04 +0000 (5 22:12 +0200)
committerPhilippe Brochard <pbrochard@common-lisp.net>
Fri, 5 Apr 2013 20:12:04 +0000 (5 22:12 +0200)
src/clfswm-util.lisp
src/menu-def.lisp

index 9440d58..425a60c 100644 (file)
@@ -1400,6 +1400,10 @@ For window: set current child to window or its parent according to window-parent
   "Set a sloppy select policy for the current frame."
   (set-focus-policy-generic :sloppy-select))
 
+(defun current-frame-set-sloppy-select-window-policy ()
+  "Set a sloppy select window policy for the current frame."
+  (set-focus-policy-generic :sloppy-select-window))
+
 
 
 (defun set-focus-policy-generic-for-all (focus-policy)
@@ -1424,6 +1428,10 @@ For window: set current child to window or its parent according to window-parent
   "Set a sloppy select policy for all frames."
   (set-focus-policy-generic-for-all :sloppy-select))
 
+(defun all-frames-set-sloppy-select-window-policy ()
+  "Set a sloppy select window policy for all frames."
+  (set-focus-policy-generic-for-all :sloppy-select-window))
+
 
 
 ;;; Ensure unique name/number functions
index 2358cd9..403aeb3 100644 (file)
 (add-menu-key 'frame-focus-policy "b" 'current-frame-set-sloppy-focus-policy)
 (add-menu-key 'frame-focus-policy "c" 'current-frame-set-sloppy-strict-focus-policy)
 (add-menu-key 'frame-focus-policy "d" 'current-frame-set-sloppy-select-policy)
+(add-menu-key 'frame-focus-policy "e" 'current-frame-set-sloppy-select-window-policy)
 (add-menu-comment 'frame-focus-policy "-=- For all frames -=-")
-(add-menu-key 'frame-focus-policy "e" 'all-frames-set-click-focus-policy)
-(add-menu-key 'frame-focus-policy "f" 'all-frames-set-sloppy-focus-policy)
-(add-menu-key 'frame-focus-policy "g" 'all-frames-set-sloppy-strict-focus-policy)
-(add-menu-key 'frame-focus-policy "h" 'all-frames-set-sloppy-select-policy)
+(add-menu-key 'frame-focus-policy "f" 'all-frames-set-click-focus-policy)
+(add-menu-key 'frame-focus-policy "g" 'all-frames-set-sloppy-focus-policy)
+(add-menu-key 'frame-focus-policy "h" 'all-frames-set-sloppy-strict-focus-policy)
+(add-menu-key 'frame-focus-policy "i" 'all-frames-set-sloppy-select-policy)
+(add-menu-key 'frame-focus-policy "j" 'all-frames-set-sloppy-select-window-policy)