diff --git a/src/manager.scm b/src/manager.scm index 63d1529..3b9ef36 100644 --- a/src/manager.scm +++ b/src/manager.scm @@ -132,10 +132,12 @@ (if (equal? name (intern-atom dpy "WM_TAKE_FOCUS" #f)) (begin (set-input-focus dpy main-window (revert-to parent) time) - (if client + (if (and client (eq? (manager-type split) + (wm:type wm))) (handle-external-message wm exit (list 'select-client client - time))))) + time))) + )) (if (equal? name (intern-atom dpy "WM_DELETE_WINDOW" #f)) (if (null? (wm:clients wm)) ;; (destroy-wm wm) would dead-lock @@ -153,7 +155,7 @@ (let* ((window (second msg)) (client (create-client wm window)) (maybe-rect (third msg))) - (set-wm:clients! wm (cons client (wm:clients wm))) + (set-wm:clients! wm (append (wm:clients wm) (list client))) (send internal-out-channel (list 'init-client client maybe-rect)) (send internal-out-channel (list 'fit-client client))