added thread names
removed kill-client added main-window drawing
This commit is contained in:
parent
248b97a1fc
commit
537c32ce6c
|
@ -8,7 +8,6 @@
|
||||||
(corner-width int 10)
|
(corner-width int 10)
|
||||||
(border-style symbol 'raised) ;; raised | sunken | flat
|
(border-style symbol 'raised) ;; raised | sunken | flat
|
||||||
(border-colors colors '("#333333" "#dddddd"))
|
(border-colors colors '("#333333" "#dddddd"))
|
||||||
(kill-client keys "M-c")
|
|
||||||
)
|
)
|
||||||
|
|
||||||
(define (create-move-wm out-channel dpy parent options . children)
|
(define (create-move-wm out-channel dpy parent options . children)
|
||||||
|
@ -16,16 +15,23 @@
|
||||||
(manager-type move) move-wm-options-spec
|
(manager-type move) move-wm-options-spec
|
||||||
out-channel
|
out-channel
|
||||||
(lambda (wm in-channel)
|
(lambda (wm in-channel)
|
||||||
(spawn (lambda ()
|
(spawn* (list 'move-wm wm)
|
||||||
(move-wm-handler wm in-channel)))
|
(lambda (release)
|
||||||
|
(release)
|
||||||
|
(move-wm-handler wm in-channel)))
|
||||||
wm)))
|
wm)))
|
||||||
|
|
||||||
(define (move-wm-handler wm channel)
|
(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 loop ()
|
||||||
(let ((msg (receive channel)))
|
(let ((msg (receive channel)))
|
||||||
(case (car msg)
|
(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)
|
((fit-windows)
|
||||||
(map (lambda (client)
|
(map (lambda (client)
|
||||||
|
@ -79,11 +85,10 @@
|
||||||
(install-dragging-control channel dpy
|
(install-dragging-control channel dpy
|
||||||
(titlebar:window titlebar)
|
(titlebar:window titlebar)
|
||||||
(client:client-window client))
|
(client:client-window client))
|
||||||
(grab-shortcut dpy (client:client-window client)
|
(spawn*
|
||||||
(get-option-value options 'kill-client)
|
(list 'move-wm-client-handler wm client)
|
||||||
'kill-client channel #f) ;; -> manager.scm ??
|
(lambda (release)
|
||||||
(spawn
|
(release)
|
||||||
(lambda ()
|
|
||||||
(let loop ()
|
(let loop ()
|
||||||
(select*
|
(select*
|
||||||
(wrap (receive-rv channel)
|
(wrap (receive-rv channel)
|
||||||
|
@ -102,9 +107,7 @@
|
||||||
(send (wm:out-channel wm)
|
(send (wm:out-channel wm)
|
||||||
(list 'root-drop (client:window client)
|
(list 'root-drop (client:window client)
|
||||||
root-x root-y))))))
|
root-x root-y))))))
|
||||||
((kill-client)
|
))))
|
||||||
(let ((time (second msg)))
|
|
||||||
(delete-window dpy (client:window client) time)))))))
|
|
||||||
;; TODO: internal channel
|
;; TODO: internal channel
|
||||||
(loop))))
|
(loop))))
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue