prevent move-wm from crashing for immediately destroyed windows like xmms does

added handling of titlebar-click and kill-client button
This commit is contained in:
frese 2003-04-17 14:14:05 +00:00
parent f9921315de
commit 7a8a3c977d
1 changed files with 7 additions and 1 deletions

View File

@ -57,7 +57,8 @@
(let* ((client (second msg))
(dpy (wm:dpy wm))
(window (client:window client))
(state (if (window-contains-focus? dpy window)
(state (if (and (window-exists? dpy window)
(window-contains-focus? dpy window))
'focused
'normal))
(titlebar (car (client:data client)))
@ -107,6 +108,11 @@
(send (wm:out-channel wm)
(list 'root-drop (client:window client)
root-x root-y))))))
((click)
(wm-select-client wm client (fourth msg)))
;; from titlebar-buttons
((kill)
(delete-window dpy (client:window client) (second msg)))
))))
;; TODO: internal channel
(loop))))