- fixed default colors

- added update-manager-state to update the empty-titlebar
- added root-drop
This commit is contained in:
frese 2003-04-01 13:23:56 +00:00
parent c19af840d8
commit 037d352da4
1 changed files with 19 additions and 12 deletions

View File

@ -1,9 +1,9 @@
(define-options-spec switch-wm-options-spec (define-options-spec switch-wm-options-spec
(titlebar-colors colors '("#aaaaaa" "#eeeeee" "#777777" "black")) (titlebar-colors colors '("#aaaaaa" "#eeeeee" "#777777" "black"))
(titlebar-colors-active colors '("#666699" "#aaaacc" "#333366" "#eeeeee")) (titlebar-colors-focused colors '("#666699" "#aaaacc" "#333366" "#eeeeee"))
(titlebar-colors-focused colors '("#9999aa" "#eeeeff" "#777788" "black")) (titlebar-colors-active colors '("#9999aa" "#eeeeff" "#777788" "black"))
(titlebar-height int 18) (titlebar-height int 18)
(titlebar-style symbol 'flat) (titlebar-style symbol 'raised)
(font font "-*-helvetica-medium-r-normal-*-12-*-*-*-*-*-*-*") (font font "-*-helvetica-medium-r-normal-*-12-*-*-*-*-*-*-*")
(select-next keys "M-k n") (select-next keys "M-k n")
(select-previous keys "M-k p") (select-previous keys "M-k p")
@ -66,7 +66,11 @@
;; client changed it's size ?? ;; client changed it's size ??
(fit-client-window wm (second msg))) (fit-client-window wm (second msg)))
;; TODO: need focus-in of manager to update empty-titlebar ((update-manager-state)
(let ((state (if (window-contains-focus? dpy (wm:window wm))
'focused
'active)))
(set-titlebar-state! empty-titlebar state)))
((update-client-state) ((update-client-state)
(let* ((client (second msg)) (let* ((client (second msg))
@ -124,8 +128,8 @@
(set-window-border-width! dpy (client:window client) 0) (set-window-border-width! dpy (client:window client) 0)
(let* ((channel (make-channel)) (let* ((channel (make-channel))
(titlebar (create-client-titlebar channel wm client))) (titlebar (create-client-titlebar channel wm client)))
(set-data:titlebars! data (cons (cons client titlebar) (set-data:titlebars! data (append (data:titlebars data)
(data:titlebars data))) (list (cons client titlebar))))
(fit-titlebars wm data) (fit-titlebars wm data)
(update-titlebars wm data) (update-titlebars wm data)
(fit-client-window wm client) (fit-client-window wm client)
@ -133,7 +137,7 @@
(install-dragging-control channel dpy (install-dragging-control channel dpy
(titlebar:window titlebar) (titlebar:window titlebar)
(client:client-window client)) (titlebar:window titlebar))
(grab-shortcut dpy (client:client-window client) (grab-shortcut dpy (client:client-window client)
(get-option-value options 'kill-client) (get-option-value options 'kill-client)
'kill-client channel #f) 'kill-client channel #f)
@ -143,11 +147,14 @@
(let ((msg (receive channel))) (let ((msg (receive channel)))
(case (car msg) (case (car msg)
((drop) ((drop)
;; TODO: check if outside... ;; check if outside...
;;(move-window dpy (client:client-window client) (let ((root-x (fourth msg))
;; (second msg) (third msg)) (root-y (fifth msg)))
#t (let ((r (root-rectangle dpy (wm:window wm))))
) (if (not (point-in-rectangle? r root-x root-y))
(send (wm:out-channel wm)
(list 'root-drop (client:window client)
root-x root-y))))))
((click) ((click)
(wm-select-client wm client (fourth msg))) (wm-select-client wm client (fourth msg)))
((kill-client) ((kill-client)