added thread names

removed kill-client
added main-window drawing
This commit is contained in:
frese 2003-04-11 01:19:20 +00:00
parent 248b97a1fc
commit 537c32ce6c
1 changed files with 16 additions and 13 deletions

View File

@ -8,7 +8,6 @@
(corner-width int 10)
(border-style symbol 'raised) ;; raised | sunken | flat
(border-colors colors '("#333333" "#dddddd"))
(kill-client keys "M-c")
)
(define (create-move-wm out-channel dpy parent options . children)
@ -16,16 +15,23 @@
(manager-type move) move-wm-options-spec
out-channel
(lambda (wm in-channel)
(spawn (lambda ()
(move-wm-handler wm in-channel)))
(spawn* (list 'move-wm wm)
(lambda (release)
(release)
(move-wm-handler wm in-channel)))
wm)))
(define (move-wm-handler wm channel)
(let ((gc (create-gc (wm:dpy wm) (wm:window wm) '())))
(let* ((dpy (wm:dpy wm))
(window (wm:window wm))
(gc (create-gc dpy window '())))
(let loop ()
(let ((msg (receive channel)))
(case (car msg)
((draw-main-window) #t)
((draw-main-window)
(set-gc-foreground! dpy gc (black-pixel dpy))
(fill-rectangle* dpy window gc
(clip-rectangle dpy window)))
((fit-windows)
(map (lambda (client)
@ -79,11 +85,10 @@
(install-dragging-control channel dpy
(titlebar:window titlebar)
(client:client-window client))
(grab-shortcut dpy (client:client-window client)
(get-option-value options 'kill-client)
'kill-client channel #f) ;; -> manager.scm ??
(spawn
(lambda ()
(spawn*
(list 'move-wm-client-handler wm client)
(lambda (release)
(release)
(let loop ()
(select*
(wrap (receive-rv channel)
@ -102,9 +107,7 @@
(send (wm:out-channel wm)
(list 'root-drop (client:window client)
root-x root-y))))))
((kill-client)
(let ((time (second msg)))
(delete-window dpy (client:window client) time)))))))
))))
;; TODO: internal channel
(loop))))