diff --git a/src/root-manager.scm b/src/root-manager.scm index 638aabf..bc79bab 100644 --- a/src/root-manager.scm +++ b/src/root-manager.scm @@ -24,6 +24,7 @@ (kill-client keys "M-c") (user-bindings binding-list '(("F2" exec "xterm"))) (save-layout keys "F11") + (select-outer-manager keys "M-Home") ) (define-record-type root-wm :root-wm @@ -70,7 +71,8 @@ execute attach quit create-workspace save-layout - kill-client)) + kill-client + select-outer-manager)) (for-each (lambda (binding) (grab-shortcut dpy window (car binding) (cons 'binding binding) in-channel #t)) @@ -288,6 +290,18 @@ (not (test window))) (loop (window-parent dpy window)))))) + ((select-outer-manager) + (let ((time (second msg)) + (current (root-wm:current-manager root-wm)) + (dpy (root-wm:dpy root-wm))) + (if current + (let ((outer (manager-of-window + root-wm + (window-parent dpy (wm:window current))))) + (if outer + (set-input-focus dpy (wm:window outer) + (revert-to parent) time)))))) + ((manager-focused) (let ((manager (second msg))) ;; a split-wm should never be the current manager and the