added the kill-button to client titlebars
fixed select-next/previous
This commit is contained in:
parent
70d94af8a5
commit
52c1669cbe
|
@ -164,6 +164,9 @@
|
|||
root-x root-y))))))
|
||||
((click)
|
||||
(wm-select-client wm client (fourth msg)))
|
||||
;; from titlebar-buttons
|
||||
((kill)
|
||||
(delete-window dpy (client:window client) (second msg)))
|
||||
(else (mdisplay "unhandled client message: " msg "\n"))))
|
||||
;; TODO: internal channel
|
||||
(loop))))
|
||||
|
@ -191,16 +194,16 @@
|
|||
(let* ((options (wm:options wm))
|
||||
(tb
|
||||
(create-titlebar #f (wm:dpy wm) (wm:window wm) (wm:colormap wm)
|
||||
;; buttons ??
|
||||
(list ;; TODO: (cons 'draggable #f)
|
||||
(cons 'normal-colors
|
||||
(get-option options 'titlebar-colors))
|
||||
(cons 'active-colors
|
||||
(get-option options 'titlebar-colors-active))
|
||||
(cons 'focused-colors
|
||||
(get-option options 'titlebar-colors-focused))
|
||||
(cons 'border-style
|
||||
(get-option options 'titlebar-style))))))
|
||||
(get-option options 'titlebar-colors))
|
||||
(cons 'active-colors
|
||||
(get-option options 'titlebar-colors-active))
|
||||
(cons 'focused-colors
|
||||
(get-option options 'titlebar-colors-focused))
|
||||
(cons 'border-style
|
||||
(get-option options 'titlebar-style))
|
||||
(cons 'buttons '())))))
|
||||
(set-titlebar-title! tb "<empty frame>")
|
||||
tb))
|
||||
|
||||
|
@ -233,16 +236,12 @@
|
|||
|
||||
(define (select-next-client* wm clients time)
|
||||
(let ((cc (wm-current-client wm)))
|
||||
(let loop ((rest clients))
|
||||
(if (null? rest)
|
||||
(if (null? clients)
|
||||
#f
|
||||
(car clients))
|
||||
(if (eq? cc (car rest))
|
||||
(if (null? (cdr rest))
|
||||
#f
|
||||
(wm-select-client wm (cadr rest) time))
|
||||
(loop (cdr rest)))))))
|
||||
(let loop ((l (append clients clients)))
|
||||
(and (not (null? l))
|
||||
(if (eq? (car l) cc)
|
||||
(and (not (null? (cdr l)))
|
||||
(wm-select-client wm (cadr l) time))
|
||||
(loop (cdr l)))))))
|
||||
|
||||
(define (select-next-client wm time)
|
||||
(select-next-client* wm (wm-clients wm) time))
|
||||
|
|
Loading…
Reference in New Issue