added a manager-focused message

added a beep if a manager is not closed because it still has clients
This commit is contained in:
frese 2003-04-22 21:42:13 +00:00
parent d2cb491315
commit 0c58224573
1 changed files with 5 additions and 9 deletions

View File

@ -127,21 +127,17 @@
(type (property:type p)))
(if (equal? type (intern-atom dpy "WM_PROTOCOLS" #f))
(let ((name (car (property:data p)))
(time (cadr (property:data p)))
(client (wm:current-client wm)))
(time (cadr (property:data p))))
(if (equal? name (intern-atom dpy "WM_TAKE_FOCUS" #f))
(begin
(set-input-focus dpy main-window (revert-to parent) time)
(if (and client (eq? (manager-type split)
(wm:type wm)))
(handle-external-message wm exit
(list 'select-client client
time)))
))
(send internal-out-channel
(list 'manager-focused time))))
(if (equal? name (intern-atom dpy "WM_DELETE_WINDOW" #f))
(if (null? (wm:clients wm))
;; (destroy-wm wm) would dead-lock
(handle-external-message wm exit '(destroy-manager))))
(handle-external-message wm exit '(destroy-manager))
(bell dpy 100)))
))))
((destroy-window-event? xevent)
(exit 'destroy))