2007-08-22  Shawn Betts  <sabetts@shitbender.gagrod>

	* stumpwm.lisp (stumpwm-internal-loop): always give a timeout when listening for events.

2007-08-15  Shawn Betts  <sabetts@shitbender.gagrod>

	* user.lisp (format-time-string): restructure to be compatible with clisp
	(*format-time-string-alist*): minor bug fixes

2007-08-05  Shawn Betts  <sabetts@shitbender.gagrod>

	* core.lisp (xwin-role): new function
	(hide-window): don't do anything if window is already hidden
	(group-add-window): fill window's role slot
	(restore-window): likewise
	(copy-frame-tree): call copy function in mapcar
	(update-window-properties): listen for :wm_window_role changes 

	* primitives.lisp (*window-formatters*): new formatter #\r
	(window): new slot, role

	* user.lisp (choose-frame-by-number): handle an error in read-from-string

2007-08-02  Shawn Betts  <sabetts@shitbender.gagrod>

	* core.lisp (resize-frame): fix up crusty debug output

2007-07-31  Shawn Betts  <sabetts@shitbender.gagrod>

	* user.lisp (time-lambda): new macro
	(*month-names*): new defvar
	(*day-names*): likewise
	(*format-time-string-alist*): likewise
	(*format-time-string-default*): likewise
	(format-time-string): return a formatted date-time string givena
	format string.
	(get-edge): new function
	(find-closest-frame): remove function
	(neighbour): new function
	("move-focus"): use neighbour to find destination frame

	* primitives.lisp (string-to-utf8): new function

	* core.lisp (netwm-group-id): new function
	(switch-to-group): update netwm current desktop property
	(move-window-to-group): update window's netwm desktop property
	(netwm-update-groups): new function
	(kill-group): call netwm-update-groups
	(netwm-set-group-properties): new function
	(add-group): call netwm-set-group-properties
	(group-add-window): update window's netwm desktop property
	(netwm-remove-window): new function
	(withdraw-window): call netwm-remove-window
	(netwm-set-properties): rename from net-set-properties. add netwm
	desktop properties.
	(init-screen): call netwm-set-properties
	(:client-message): new event handler

2007-07-30  Shawn Betts  <sabetts@shitbender.gagrod>

	* stumpwm.lisp (stumpwm-internal-loop): debug output the length of the timeout

2007-07-26  Shawn Betts  <sabetts@shitbender.gagrod>

	* configure.ac: check for makeinfo

2007-07-06  Shawn Betts  <sabetts@vcn.bc.ca>

	* core.lisp (withdraw-window): raise a new window in the old window's frame.

2007-06-22  Shawn Betts  <sabetts@vcn.bc.ca>

	* primitives.lisp (*top-level-error-hook*): new global

	* stumpwm.lisp (stumpwm-internal-loop): call *top-level-error-hook* when an error occurs.

2007-06-13  Shawn Betts  <sabetts@shitbender.gagrod>

	* stumpwm.lisp (get-next-timeout): don't truncate the value

	* core.lisp (frame-raise-window): raise new window before hiding old ones

2007-05-16  Shawn Betts  <sabetts@vcn.bc.ca>

	* mode-line.lisp (redraw-mode-line-for): change to a defun

	* core.lisp (withdraw-window): unmap the parent window
	(translate-id): remove debug output

2007-05-14  Shawn Betts  <sabetts@vcn.bc.ca>

	* mode-line.lisp (redraw-screen-mode-line): new function
	(redraw-mode-line-for): call redraw-screen-mode-line

2007-05-14  Shawn Betts  <sabetts@shitbender.gagrod>

	* core.lisp (translate-id): add debug output

	* mode-line.lisp (redraw-mode-line-for): add debug output

2007-05-13  Shawn Betts  <sabetts@vcn.bc.ca>

	* mode-line.lisp (mode-line-format-elt): add debugging for :eval

	* stumpwm.lisp (stumpwm): add quit-stumpwm restart. set *package* to *default-package*

	* primitives.lisp (*default-package*): new global

2007-05-12  Shawn Betts  <sabetts@vcn.bc.ca>

	* core.lisp (pick-prefered-frame): make sure tile-group-last-frame
	is valid.
	(update-window-border): give non-normal windows a transparent background
	(reparent-window): likewise

	* primitives.lisp (print-object frame): include the frame number
	(*new-window-prefered-frame*): new global variable

	* core.lisp (group-add-window): call pick-prefered-frame
	(pick-prefered-frame): new function
	(restore-window): call pick-prefered-frame
	(restore-window): only focus the new window if it's in the current frame
	(:map-request): likewise
	(maybe-hide-windows): use remove, not delete.

2007-05-11  Shawn Betts  <sabetts@shitbender.gagrod>

	* stumpwm.asd (:stumpwm): use :serial dependencies

	* stumpwm.lisp (stumpwm-internal-loop): don't ungrab the keyboard
	when entering the debugger.

2007-05-10  Shawn Betts  <sabetts@shitbender.gagrod>

	* core.lisp (:key-press): ungrab the keyboard after reading the key.

2007-05-10  Shawn Betts  <sabetts@vcn.bc.ca>

	* core.lisp (handle-keymap): don't grab the keyboard
	(:key-press): grab the keyboard at the beginning. ungrab it at the
	very end. call allow-events after grabbing.

	* user.lisp (eval-line): dont take screen arg. callers updated.

2007-05-09  Shawn Betts  <sabetts@vcn.bc.ca>

	* core.lisp (:configure-request): more verbose debug output
	(grab-keyboard): likwise
	(ungrab-keyboard): likwise
	(:focus-out): new event handler

2007-05-07  Shawn Betts  <sabetts@shitbender.gagrod>

	* user.lisp (eval-line): print all values
	(columnize): new function
	(display-keybinding): print prefix keys. print bindings in columns
	("reload"): properly notify when asdf isn't loaded

	* primitives.lisp (*suppress-abort-messages*): new global
	(concat): new defun

	* kmap.lisp (search-kmap): match command before checking if its a kmap

	* user.lisp ("windowlist"): properly tell the user when there are
	no managed windows.
	(argument-pop-or-read): throw :abort
	(argument-pop-rest-or-read): likewise
	(:frame): likewise
	("colon"): likewise
	("windowlist"): likewise
	(parse-and-run-command): likewise
	(interactive-command): echo "Abort." for aborted commands unless *suppress-echo-timeout* is on.
	(display-keybinding): use message-no-timeout

	* input.lisp (*input-map*): bind ESC to input-abort

2007-05-06  Shawn Betts  <sabetts@shitbender.gagrod>

	* user.lisp ("gnew"): check if group exists
	("gnewbg"): likewise

	* input.lisp (input-find-completions): make sure the symbol is fboundp

	* core.lisp (find-group): new function

2007-05-05  Shawn Betts  <sabetts@shitbender.gagrod>

	* primitives.lisp (*focus-color*): set to gray

	* user.lisp ("loadrc"): wrap in with-restarts-menu
	("lastmsg"): handle case when there is no last message.
	("gmerge"): new command
	(*root-map*): switch around window navigating bindings to be the same as ratpoison

	* stumpwm.lisp (load-rc-file): take new argument, catch-errors.
	(stumpwm): print *startup-message* when non-nil on start up.

	* primitives.lisp (*window-format*): crop title at 50 chars
	(*startup-message*): new defvar

2007-05-04  Shawn Betts  <sabetts@shitbender.gagrod>

	* primitives.lisp (format-expand): allow a numeric "prefix" that
	crops the argument's string length.

2007-05-04  Shawn Betts  <sabetts@vcn.bc.ca>

	* core.lisp (add-window): call screen-add-mapped-window
	(restore-window): likewise
	(withdraw-window): call screen-remove-mapped-window
	(netwm-update-client-list): new function
	(screen-add-mapped-window): likewise
	(screen-remove-mapped-window): likewise
	(net-set-properties): set the _NET_CLIENT_LIST property

2007-05-03  Shawn Betts  <sabetts@vcn.bc.ca>

	* make-image.lisp: return error code 0 for sbcl
	set SBCL_HOME for sbcl.

	* Makefile: new file

	* user.lisp ("reload"): don't call asdf if it's not loaded.

	* primitives.lisp (*new-frame-action*): new global

	* core.lisp (choose-new-frame-window): new function
	(split-frame): call choose-new-frame-window. show the new frame's
	window.

2007-04-27  Shawn Betts  <sabetts@vcn.bc.ca>

	* primitives.lisp (+netwm-supported+): new constant
	(+netwm-window-types+): likewise
	(+wm-take-focus+): remove constant
	(+wm-state+): likewise
	(+wm-protocols+): likewise
	(+wm-delete-window+): likewise
	(utf8-to-string): new function

	* core.lisp (send-selection): pass args to change-property
	properly.
	(translate-id): replace unknown chars with ?
	(xwin-net-wm-name): new function
	(xwin-name): call xwin-net-wm-name
	(default-border-width-for-type): handle :dialog type
	(gravity-for-window): likewise
	(xwin-type): return supported netwm types
	(xwin-strut): newfunction
	(delete-window): intern the atom
	(net-set-properties): new function
	(init-screen): call net-set-properties

	* stumpwm.lisp (timer-p): remove function

	* primitives.lisp (print-backtrace): new function
	(print-backtrace): print to *standard-output* for sbcl

	* stumpwm.lisp (stumpwm-internal-loop): use handler-bind for
	errors. print a backtrace for the error.

2007-04-25  Shawn Betts  <sabetts@vcn.bc.ca>

	* user.lisp (*root-map*): add "h" binding
	(*help-map*): new global
	(lookup-symbol): new function
	(:variable): new stumpwm type
	(:function): likewise
	(:key-seq): likewise
	("describe-key"): new command
	("describe-variable"): likewise
	("describe-function"): likewise
	("where-is"): likewise

	* primitives.lisp (*suppress-echo-timeout*): rename from
	*supress-echo-timeout*. all callers updated.

	* kmap.lisp (print-key-seq): new function
	(lookup-key-sequence): likewise
	(kmap-p): likewise
	(search-kmap): likewise

	* input.lisp (read-key-no-modifiers): new function
	(read-one-char): call read-key-no-modifiers

	* core.lisp (unmap-all-message-windows): cancel the timer
	(unmap-all-frame-indicators): likewise
	(reset-message-window-timer): just call the unmap function in the
	timer
	(reset-frame-indicator-timer): likewise
	(echo-string-list): if *suppress-echo-timeout* is T, cancel the
	message timer.
	(message-no-timeout): new function
	(read-from-keymap): take optional update-fn argument
	(handle-keymap): likewise

	* stumpwm.lisp (get-next-timeout): return a whole number

	* primitives.lisp (*window-name-source*): new global

	* core.lisp (window-name): use *window-name-source* to decide what
	value to return.

	* user.lisp (*root-map*): new "A" binding
	("title"): new command

	* primitives.lisp (window): rename name slot to title. all callers
	updated.

	* core.lisp (window-name): new function

	* user.lisp ("reload"): use restarts-menu
	(select-from-menu): make prompt optional. display prompt in menu.
	(restarts-menu): new function
	(with-restarts-menu): new macro
	(with-restarts-menu): use handler-bind, not handler-case
	(restarts-menu): remove newlines from restarts, errors

	* core.lisp (handle-event): add a top-level restart

	* stumpwm.lisp (*timer-list*): new global
	(timer): new defstruct
	(timer-p): new function
	(run-with-timer): likewise
	(cancel-timer): likewise
	(schedule-timer): likewise
	(sort-timers): likewise
	(run-expired-timers): likewise
	(get-next-timeout): likewise
	(stumpwm-internal-loop): handle timers

	* primitives.lisp (*timeout*): remove global
	(reset-timeout): remove function
	(reset-timeout-for-frame-indicator): remove function
	(*frame-indicator-timer*): new global
	(*message-window-timer*): likewise

	* mode-line.lisp (*mode-line-timeout*): new global
	(*mode-line-timer*): likewise
	(update-screen-mode-lines): new function
	(turn-on-mode-line-timer): likewise
	(maybe-cancel-mode-line-timer): likewise
	(toggle-mode-line): call maybe-cancel-mode-line-timer and turn-on-mode-line-timer

	* core.lisp (reset-message-window-timer): new function
	(reset-frame-indicator-timer): likewise
	(show-frame-indicator): call reset-frame-indicator-timer
	(echo-string-list): call reset-message-window-timer

2007-04-23  Shawn Betts  <sabetts@vcn.bc.ca>

	* mode-line.lisp (toggle-mode-line): use :bottom not 'bottom in expand-tree calls

	* core.lisp (split-frame-h): properly handle modulo
	(split-frame-v): likewise
	(expand-tree): properly expand the children with modulo
	(join-subtrees): rewrite
	(offset-frames): new function
	(balance-frames): properly resize with modulo
	(expand-tree): resize proportionally

	* user.lisp (*root-map*): add + binding
	(split-frame-in-dir): new function
	("hsplit"): call split-frame-in-dir
	("vsplit"): likewise
	(horiz-split-frame): remove function
	(vert-split-frame): likewise
	(remove-split): call closest-sibling
	("resize"): display message when there's only 1 frame
	("balance-frames"): new command

	* primitives.lisp (*unfocus-window-hook*): remove global var
	(*focus-group-hook*): new global var
	(screen): remove current-frame slot
	(print-object): use parens instead of < and >
	(print-object): likewise
	(list-splice-replace): new function
	(*min-frame-width*): new global var
	(*min-frame-height*): likewise

	* core.lisp (def-thing-attr-macro): new macro
	(switch-to-group): call *focus-group-hook* hook
	(focus-window): don't call *unfocus-window-hook*. pass both old
	and new windows to *focus-window-hook*
	(make-initial-frame): just take the screen as an argument. all
	callers updated.
	(funcall-on-leaf): handle >2 children
	(funcall-on-node): likewise
	(replace-frame-in-tree): likewise
	(tree-accum-fn): likewise
	(tree-iterate): likewise
	(tree-row-split): likewise
	(tree-column-split): likewise
	(expand-tree): likwise
	(join-subtrees): likewise
	(resize-frame): likewise
	(sibling-internal): new function
	(sibling): remove function
	(next-sibling): new function
	(prev-sibling): likewise
	(tree-width): calculate correctly
	(tree-height): likewise
	(tree-parent): new function
	(tree-split-type): new function
	(offset-tree): new function
	(offset-tree-dir): call offset-tree
	(spree-root-branch): remove function
	(depth-first-search): likewise
	(offset-frames): likewise
	(balance-frames): new function
	(split-frame): splice frames that are split in the same direction
	as their parent into the parent list.
	(message): new function. all (echo-string (current-screen) ..)
	callers updated.
	(current-group): new
	function. all (screen-current-group (current-screen)) callers
	updated.
	(closest-sibling): new function
	
2007-04-18  Shawn Betts  <sabetts@vcn.bc.ca>

	* user.lisp (focus-forward): properly detect when there is no
	other window.

2007-02-26  Shawn Betts  <sabetts@vcn.bc.ca>

	* user.lisp ("command-mode"): echo a message about how to exit command mode

	* stumpwm.lisp (stumpwm): raise one of the windows in the initial frame

	* primitives.lisp (*deny-map-request*): new global
	(*deny-raise-request*): likewise
	(*suppress-deny-messages*): likewise
	(match-res-or-type): new function
	(deny-request-p): likewise

	* core.lisp (move-window-to-group): raise the window in its new frame if the frame is empty
	(group-add-window): windows default to iconic
	(process-mapped-window): don't map the parent window
	(find-withdrawn-window): add type declare 
	(withdraw-window): likewise
	(destroy-window): likewise
	(restore-window): likewise
	(move-window-to-head): likewise
	(restore-window): deny some windows their map request
	(handle-managed-window): likewise
	(:map-request): likwise

2007-02-24  Shawn Betts  <sabetts@shitbender.gagrod>

	* core.lisp (:key-press): only grab the key when reading another key

	* primitives.lisp (screen): new slot msg-border-width

	* core.lisp (set-msg-border-width): new function
	(update-border-all-screens): likewise
	(update-border-for-screen): likewise

	* input.lisp (draw-input-bucket): wrap window resizing in its own with-state

	* core.lisp (no-focus): call update-window-border

2007-02-21  Shawn Betts  <sabetts@shitbender.gagrod>

	* core.lisp (send-fake-key): add :x :y :root-x :root-y

2007-02-20  Shawn Betts  <sabetts@shitbender.gagrod>

	* input.lisp (setup-input-window): use xlib:with-state
	(draw-input-bucket): likewise

	* core.lisp (screen-y): use xlib:with-state
	(true-height): likewise
	(true-width): likewise
	(maximize-window): likewise
	(setup-win-gravity): likewise
	(setup-message-window): likewise
	(show-frame-indicator): likewise
	(echo-in-window): likewise

2007-02-17  Shawn Betts  <sabetts@vcn.bc.ca>

	* stumpwm.lisp (error-handler): ignore match-errors

2007-02-16  Shawn Betts  <sabetts@vcn.bc.ca>

	* user.lisp (:gravity): new arg type
	("gravity"): new command

	* stumpwm.sbcl: use keyword symbols

	* primitives.lisp (+default-window-background-color+): new constant
	(*normal-gravity*): new global
	(*maxsize-gravity*): likewise
	(*transient-gravity*): likewise
	(window): add gravity slot
	(screen): add win-bg-color slot

	* input.lisp (input-find-completions): handle alist completion lists
	(input-complete): likewise

	* core.lisp (update-window-border): clear the parent window with
	its background color
	(update-window-gravity): new function
	(set-normal-gravity): likewise
	(set-maxsize-gravity): likewise
	(set-transient-gravity): likewise
	(gravity-for-window): likewise
	(geometry-hints): work with window gravity
	(maximize-window): bind extra geometry-hints ret values
	(set-win-bg-color): new function
	(get-win-bg-color-pixel): likewise
	(get-gravity-coords): likewise
	(update-colors-for-screen): update the window parent's background
	color
	(init-screen): init screen-win-bg-color

2007-02-09  Shawn Betts  <sabetts@vcn.bc.ca>

	* core.lisp (handle-managed-window): show the frame indicator on focus change

	* primitives.lisp (dformat): string out non base-char chars

2007-02-06  Shawn Betts  <sabetts@shitbender.gagrod>

	* user.lisp (banish-pointer): call screen-true-height

	* core.lisp (frame-raise-window): hide windows & raise before focusing window
	(screen-true-height): new function

2007-02-05  Shawn Betts  <sabetts@shitbender.gagrod>

	* user.lisp ("ratclick"): call current-window
	("gmove"): likewise
	("insert"): likewise
	("mark"): likewise
	(other-hidden-window): remove unused lexical var f

	* core.lisp (restore-window): update all X caches for window
	(xwin-type): an aspect hint window is considered :maxsize
	(maybe-hide-windows): rename from maybe-hide-window. take the
	group and frame as args. hide all windows in the frame.
	(focus-window): don't hide any windows
	(frame-raise-window): call maybe-hide-windows
	(current-window): new function

2007-02-04  Shawn Betts  <sabetts@shitbender.gagrod>

	* primitives.lisp (screen): add withdrawn-windows slot

	* core.lisp (geometry-hints): use ceiling for aspect ratio hints
	(reparent-window): grab the server
	(remove-window): remove function
	(find-withdrawn-window): new function
	(restore-window): likewise
	(withdraw-window): likewise
	(destroy-window): likewise
	(:map-request): handle withdrawn windows
	(:unmap-notify): call withdraw-window
	(:destroy-notify): call destroy-window
	(:reparent-notify): new event handler

2007-02-01  Shawn Betts  <sabetts@vcn.bc.ca>

	* user.lisp (pull-other-hidden-window): rename from other-hidden-window. all callers updated.
	(other-hidden-window): new function

	* core.lisp (save-frame-excursion): new macro

2007-01-31  Shawn Betts  <sabetts@vcn.bc.ca>

	* core.lisp (split-frame-v): call *new-frame-hook*
	(split-frame-h): likewise

	* primitives.lisp (*new-frame-hook*): new hook

	* core.lisp (current-group): new function

2007-01-28  Shawn Betts  <sabetts@vcn.bc.ca>

	* core.lisp (set-font): open the font for each screen
	(add-group): put the new group at the end of the group list
	(remove-window): update the mode line
	(process-mapped-window): likewise

	* mode-line.lisp (mode-line-format-elt): use the symbol as a string if it's unbound. ignore T and NIL
	(screen-mode-line-mode): check the arg types
	(toggle-mode-line): likewise

2007-01-27  Shawn Betts  <sabetts@vcn.bc.ca>

	* stumpwm.lisp (stumpwm-internal-loop): print the error before throwing :quit

	* core.lisp (reparent-window): give normal windows a black bg

	* stumpwm.lisp (error-handler): new function

	* primitives.lisp (window): new slots width height

	* core.lisp (xwin-send-configuration-notify): take the geometry as arguments. all callers updated.
	(geometry-hints): use cached window geometry slots
	(reparent-window): likewise
	(maximize-window): call set-window-geometry
	(group-add-window): init x y width height border-width window slots
	(process-mapped-window): call set-window-geometry
	(handle-unmanaged-window): new function
	(handle-managed-window): likewise
	(:configure-request): call handle-managed-window and handle-unmanaged-window
	(update-window-properties): only maximize the window being updated
	(handle-event): catch xlib:window-error and xlib:drawable-error events

2007-01-26  Shawn Betts  <sabetts@vcn.bc.ca>

	* stumpwm.lisp (error-handler): new defun
	(stumpwm): set error handler
	(stumpwm-internal-loop): remove catch for drawable and window-error 

	* core.lisp (set-font): use the first font that matches

	* stumpwm.lisp (stumpwm-internal-loop): handle window-error and
	drawable-error errors

	* core.lisp (handle-event): remove handler-case

2007-01-25  Shawn Betts  <sabetts@vcn.bc.ca>

	* user.lisp (window-send-string): handle RET and TAB

	* core.lisp (key-to-keycode+state): new function
	(send-fake-key): use key-to-keycode+state

	* input.lisp (draw-input-bucket): make room for the cursor

	* primitives.lisp (*debug-level*): new defvar
	(*debug-stream*): likewise
	(dformat): send output to *debug-stream*

	* user.lisp ("move-focus"): use error for invalid directions

	* stumpwm.lisp (stumpwm): call display-finish-output after each init-screen

	* core.lisp (echo-string-list): run *message-hook* hook

2007-01-21  Shawn Betts  <sabetts@vcn.bc.ca>

	* core.lisp (xwin-screen): remove. all callers updated.
	(focus-window): don't call display-finish-output
	(maximize-window): call display-finish-output, not display-force-output
	(draw-frame-numbers): likewise
	(show-frame-indicator): likewise
	(echo-string-list): likewise
	(init-screen): likewise
	(:configure-request): likewise
	(:key-press): likewise

2007-01-20  Shawn Betts  <sabetts@vcn.bc.ca>

	* stumpwm.asd: only require :clx in sbcl

2007-01-17  Shawn Betts  <sabetts@shitbender.gagrod>

	* core.lisp (show-frame-indicator): clear the frame indicator on
	all other screens.

	* user.lisp ("ratclick"): new function

	* core.lisp (send-fake-click): new function

	* user.lisp ("snext"): force the frame indicator to show
	("sprev"): likewise
	("sother"): likewise

2007-01-15  Shawn Betts  <sabetts@vcn.bc.ca>

	* user.lisp (*root-map*): bind mark to C-t # and lastmsg back to m
	and C-m. Bind C-t C-t to other-in-frame.

	* input.lisp (input-find-completions): properly match strings

	* user.lisp (*root-map*): add C-SPC binding. bind lastmsg to M. bind mark to m and C-m
	("fselect"): make arg non-optional
	("mark"): new command
	("clear-marks"): likewise
	("pull-marked"): likewise

	* primitives.lisp (window): new slot marked
	(screen): new slot marked-gc
	(*window-formatters*): add formatter #\m
	(*window-format*): add %m

	* mode-line.lisp (make-mode-line-window): add :exposure to event mask

	* core.lisp (fmt-window-marked): new function
	(update-window-mark): likewise
	(marked-windows): likewise
	(clear-window-marks): likewise
	(show-frame-indicator): don't draw it if there's only 1 frame
	(init-screen): initialise marked-gc
	(:exposure): new event handler

2007-01-14  Shawn Betts  <sabetts@vcn.bc.ca>

	* user.lisp (focus-forward): add predicate function
	(other-hidden-window): fix hidden windows predicate function
	("pull-hidden-next"): pass predicate function to focus-forward
	("pull-hidden-previous"): likewise
	("prev-in-frame"): call frame-sort-windows
	("next-in-frame"): likewise
	("command-mode"): new command
	("abort"): pop the top map

	* primitives.lisp (format-expand): handle the case when % is the
	last char in the string.

	* user.lisp (*root-map*): bind pull-hidden-next,
	pull-hidden-previous, pull-hidden-other, other-in-frame,
	next-in-frame, prev-in-frame
	(pull-window): new function
	(focus-forward): new argument pull-p. use pull-window
	(pull-window-by-number): use pull-window
	(other-hidden-window): new function
	(other-window-in-frame): likewise
	("pull-hidden-next"): new command
	("pull-hidden-previous"): likewise
	("pull-hidden-other"): likewise
	("next-in-frame"): likewise
	("prev-in-frame"): likewise
	("other-in-frame"): likewise
	(other-window): use the group's window list to find the other
	window.
	("other"): show the frame indicator if a frame switch occurred.

2007-01-11  Shawn Betts  <sabetts@vcn.bc.ca>

	* user.lisp ("putsel"): new command
	("getsel"): likewise

	* stumpwm.asd: properly error out when clx isn't detected.

2007-01-09  Shawn Betts  <sabetts@vcn.bc.ca>

	* core.lisp (font-exists-p): rewrite using xlib:list-font-names
	(xwin-grab-keys): only grab the key if it has a corresponding keycode.

	* user.lisp (format-time-string): new function
	(echo-date): call format-time-string

	* version.lisp (*version*): include a compile/load time.

2007-01-08  Shawn Betts  <sabetts@vcn.bc.ca>

	* primitives.lisp (run-prog-collect-output): collect error output as well for sbcl and cmucl
	(split-string): return ("") when splitting the empty string

	* stumpwm.asd (:stumpwm): change around dependencies

	* mode-line.lisp (screen-mode-line-mode): new function

2007-01-07  Shawn Betts  <sabetts@vcn.bc.ca>

	* core.lisp (font-exists-p): query something about the font. catch xlib:font-error conditions.

	* primitives.lisp (*run-or-raise-all-groups*): new global var

	* user.lisp (argument-pop-or-read): new function
	(argument-pop-rest-or-read): likewise
	(run-or-raise): search only the current group when
	*run-or-raise-all-groups* is NIL.

2006-12-16  Shawn Betts  <sabetts@vcn.bc.ca>

	* sample-stumpwmrc.lisp: add a call to use-package

	* core.lisp (setup-win-gravity): make sure the window doesn't go
	off the left side of the screen.

	* user.lisp ("windows"): take optional fmt arg
	(argument-line): new struct
	(*command-type-hash*): new global
	(argument-line-end-p): new function
	(argument-pop): likewise
	(argument-pop-rest): likewise
	(define-stumpwm-type): new macro
	(:window-number): new command type
	(:number): likewise
	(:string): likewise
	(:key): likewise
	(:window-name): likewise
	(:group-name): likewise
	(:group): likewise
	(:frame): likewise
	(:shell): likewise
	(:rest): likewise
	(parse-and-run-command): use argument-line and *command-type-hash*
	to read in arguments
	(interactive-command): remove screen argument. all callers updated.
	("colon"): use :rest as optional argument
	(echo-groups): take a window format as an optional argument
	("groups"): take optional fmt arg
	("vgroups"): take optional group and window fmt args
	("windowlist"): take option fmt arg

	* input.lisp (input-forward-kill-word): new function
	(input-backward-kill-word): likewise
	(*input-map*): bind M-d and M-DEL
	(read-one-line): catch :abort
	(input-abort): throw :abort

	* user.lisp (programs-in-path): new function
	("exec"): change arg to type :shell
	(parse-and-run-command): handle :shell type
	("insert"): new command
	(window-send-string): new function
	("insert"): use window-send-string

	* primitives.lisp (pathname-is-executable-p): new function

	* input.lisp (completing-read): check the type of completions argument
	(input-find-completions): handle the case where completions is a function

2006-12-15  Shawn Betts  <sabetts@vcn.bc.ca>

	* user.lisp (all-commands): new function
	("select"): change arg type to :window-name
	(parse-and-run-command): use completing-read on some arg types
	("colon"): using completing-read
	("pull"): change arg type to :window-number
	("gselect"): change arg type to :group-name

	* input.lisp (*input-map*): bind TAB and ISO_Left_Tab to tab completion
	(*input-last-command*): new global
	(*input-completions*): likewise
	(completing-read): new function
	(read-one-line): set *input-last-command* to null
	(input-point): new function
	(input-validate-region): likewise
	(input-delete-region): likewise
	(input-substring): likewise
	(*input-current-completions*): new global var
	(*input-current-completions-idx*): likewise
	(input-find-completions): new function
	(input-complete): likewise
	(input-complete-forward): likewise
	(input-complete-backward): likewise
	(process-input): set *input-last-command* to last command

2006-12-14  Shawn Betts  <sabetts@vcn.bc.ca>

	* user.lisp ("snext"): show frame indicator
	("sprev"): likewise
	("sother"): likewise

	* stumpwm.lisp (stumpwm): pass host into init-screen. don't set DISPLAY env var

	* primitives.lisp (screen): new slot, host
	(screen-display-string): new function
	(run-prog): set the DISPLAY variable for the current screen
	(run-prog-collect-output): likewise

	* core.lisp (init-screen): new arg, host
	(:key-press): remove root arg

	* user.lisp ("sprev"): call sort-screens

	* stumpwm.lisp (stumpwm): pass an id to init-screen. focus a
	window in each screen.

	* primitives.lisp (screen): new slot, id
	(*current-screen*): remove global

	* core.lisp (no-focus): call move-screen-to-head
	(sort-screens): new function
	(next-screen): use sort-screens
	(move-screen-to-head): use remove instead of delete
	(switch-to-screen): focus the appropriate window directly
	(screen-set-focus): call move-screen-to-head
	(current-screen): the current screen is now the car of *screen-list*
	(init-screen): new arg, id
	(:key-press): do not bind *current-screen*

	* mode-line.lisp (*screen-mode-line-formatters*): add %g to print the group list

	* user.lisp (fmt-group-list): new function
	(run-or-raise): search all groups for a matching window

2006-12-12  Shawn Betts  <sabetts@vcn.bc.ca>

	* user.lisp ("windowlist"): display a message when there are no windows to select from

	* stumpwm.lisp (stumpwm): update modifier mapping before calling init-screen

	* primitives.lisp (modifiers): new slot, numlock

	* kmap.lisp (x11-mods): add optional arg with-numlock

	* core.lisp (screen-y): handle the case when the mode-line is on the bottom 
	(remove-window): reparent the window back to root
	(xwin-grab-keys): grab keys including the numlock modifier

2006-12-01  Shawn Betts  <sabetts@shitbender.gagrod>

	* user.lisp (focus-last-frame): show the frame indicator

	* core.lisp (raise-window): raise the window's parent
	(split-frame): set the group's last frame to the new frame.

	* user.lisp (*root-map*): bind TAB to fother
	(focus-last-frame): new function
	("fother"): new command

	* primitives.lisp (tile-group): add last-frame slot

	* core.lisp (focus-frame): record the last frame

2006-11-30  Shawn Betts  <sabetts@shitbender.gagrod>

	* user.lisp ("snext"): new command
	("sprev"): likewise
	("sother"): likewise

	* core.lisp (next-screen): new function
	(move-screen-to-head): likewise
	(switch-to-screen): likewise

	* user.lisp (run-commands): add a 'do' to the loop

2006-11-27  Shawn Betts  <sabetts@vcn.bc.ca>

	* user.lisp (*root-map): bind C-t ? to help

2006-11-26  Shawn Betts  <sabetts@vcn.bc.ca>

	* user.lisp (*root-map*): bind C-t " to windowlist
	("next"): if no window is focused call other-window
	("prev"): likewise
	(*menu-map*): new keymap
	(menu-state): new struct
	(bound-check-menu): new function
	(menu-up): likewise
	(menu-down): likewise
	(menu-finish): likewise
	(menu-abort): likewise
	(select-from-menu): likewise
	("windowlist"): new command
	(run-commands): new function

	* primitives.lisp (*supress-echo-timeout*): new global

	* core.lisp (echo-string-list): dont reset timeout if *supress-echo-timeout* is T
	(read-from-keymap): new function
	(handle-keymap): only use the kmap's symbol value if it's bound and a hash-table

	* user.lisp (focus-next-window): cycle through all the frame windows
	(focus-prev-window): likewise
	(focus-forward): show the frame indicator when switching frames
	(run-or-raise): likewise
	("web"): use "Firefox-bin" class

	* primitives.lisp (*window-formatters*): use window-res 

	* core.lisp (export-selection): transform the characters to card8's

2006-11-26  Shawn Betts  <sabetts@shitbender.gagrod>

	* core.lisp (no-focus): pass the last focused window in as an argument. callers updated.

2006-11-25  Shawn Betts  <sabetts@shitbender.gagrod>

	* core.lisp (add-group): check the arg types

	* user.lisp (*group-map*): add bindings to move and kill groups
	(parse-and-run-command): new option :group
	(group-forward): call next-group
	("gmove"): new command
	("gkill"): likewise

	* primitives.lisp (run-hook-with-args): ignore errors
	(run-hook): likewise

	* core.lisp (move-window-to-group): new function
	(next-group): likewise
	(merge-groups): likewise
	(kill-group): likewise
	(window-in-current-group-p): likewise
	(raise-window): call window-in-current-group-p
	(unhide-window): only actually unhide the window when the window is in the current group
	(hide-window): likewise, but hide
	(remove-window): bug fix involving windows in non-current groups
	(no-focus): only actually focus nothing if the group is current
	(focus-window): call screen-set-focus
	(screen-set-focus): new function

2006-11-25  Shawn Betts  <sabetts@vcn.bc.ca>

	* user.lisp ("gnext"): sort the windows
	("gprev"): likewise

	* core.lisp (send-fake-key): use window-xwin
	(switch-to-group): only hide/unhide windows tagged as visible

	* primitives.lisp (*top-level-error-action*): default value is :abort

	* stumpwm.lisp (stumpwm-internal-loop): handle the :abort value of *top-level-error-action*

	* mode-line.lisp (toggle-mode-line): update each group's frame list
	(redraw-mode-line-for): set *current-mode-line-formatters* to the current group

	* user.lisp (*root-map*): add lastmsg and group related bindings
	(define-stumpwm-command): remove screen argument. all callers updated.
	(parse-and-run-command): set *last-command*
	(*groups-map*): new global
	(group-forward): new function
	("gnew"): new command
	("gnewbg"): likewise
	("gnext"): likewise
	("gprev"): likewise
	(echo-groups): new function
	("groups"): new command
	("vgroups"): likewise
	(select-group): new function
	("gselect"): new command

	* primitives.lisp (group): new struct
	(tile-group): likewise
	(window): remove screen. add group. all callers updated.
	(screen): remove frame-tree, window-hash. add groups,
	current-group. all callers updated. add last-msg
	last-msg-highlights.
	(*current-screen*): new global
	(find-free-number): add optional min argument
	(*group-formatters*): new global
	(*group-format*): likewise
	(*last-command*): likewise
	(*max-last-message-size*): likewise
	(*record-last-msg-override*): likewise

	* core.lisp (move-group-to-head): new function
	(sort-groups): likewise
	(fmt-group-status): likewise
	(find-free-group-number): likewise
	(group-current-window): likewise
	(switch-to-group): likewise
	(add-group): likewise
	(window-screen): likewise
	(setf xwin-state): dont call window-xwin on win
	(xwin-unhide): new function
	(unhide-window): call xwin-unhide
	(xwin-hide): new function
	(hide-window): call xwin-hide
	(group-add-window): new generic
	(group-add-window): new method
	(add-window): call group-add-window
	(push-last-message): new function
	(echo-nth-last-message): likewise
	(echo-string-list): take a list of lines to highlight. call
	push-last-message
	(init-screen): create initial group
	(:configure-request): only grant raise request if the window's
	group is the current group
	(:key-press): bind *current-screen*

2006-11-23  Shawn Betts  <sabetts@vcn.bc.ca>

	* primitives.lisp (window): add normal-hints slot

	* user.lisp (kill-current-window): pass the xwin to xwin-kill

	* core.lisp (send-client-message): pass the xwin to send-event
	(xwin-screen): first try searching for the screen using the window
	(xwin-send-configuration-notify): rename from send-configure-notify
	(geometry-hints): use the window's cached normal-hints
	(add-window): store wm-normal-hints
	(remove-window): set the screen-focus to nil
	(delete-window): rename from xwin-delete. callers updated.
	(:configure-request): don't honour border-width requests
	(update-window-properties): new function
	(:property-notify): call update-window-properties to handle wm properties

	* user.lisp (*resize-map*): new global
	(*resize-backup*): new global
	("iresize"): new command
	("abort-iresize"): likewise
	("exit-iresize"): likewise

	* primitives.lisp (window): new struct. used almost everywhere
	xlib:windows were. dependant code updated.
	(print-object frame): new method
	(print-object window): likewise
	(screen): add message-gc and focus slots
	(print-object screen): new method

	* user.lisp (parse-and-run-command): new parameter, :optional
	(interactive-command): print the command, in the case of an error
	("colon"): make parameter the initial input and :optional

	* input.lisp (draw-input-bucket): use the message-gc

	* core.lisp (screen-height): use screen-root
	(screen-width): likewise
	(xwin-name): rename from window-name
	(xwin-class): rename from window-class
	(xwin-res-name): rename from window-res-name
	(setf xwin-state): new function
	(xwin-state): renamed from window-state
	(xwin-type): renamed from window-type
	(xwin-grab-keys): new function
	(xwin-ungrab-keys): likewise
	(xwin-delete): renamed from window-delete
	(xwin-kill): renamed from window-kill
	(find-window): new function
	(update-colors-for-screen): update the message-gc

	* stumpwm.lisp (stumpwm): use write-line

2006-11-22  Shawn Betts  <sabetts@vcn.bc.ca>

	* kmap.lisp (define-key): call sync-keys when *top-map* is changed

	* package.lisp (:stumpwm): export a bunch of symbols

2006-11-21  Shawn Betts  <sabetts@vcn.bc.ca>

	* user.lisp ("loadrc"): use the screen supplied to the function
	("escape"): ignore screen

	* input.lisp (input-handle-selection-event): ignore selection
	(draw-input-bucket): use translate-id

	* mode-line.lisp (redraw-mode-line-for): use translate-id

	* core.lisp (translate-id): new function
	(max-width): use translate-id
	(echo-string-list): likewise

2006-11-20  Shawn Betts  <sabetts@vcn.bc.ca>

	* core.lisp (get-x-selection): new function

2006-11-19  Shawn Betts  <sabetts@vcn.bc.ca>

	* primitives.lisp (*x-selection*): new global variable

	* input.lisp (input-handle-key-press-event): new function
	(input-handle-selection-event): likewise
	(read-key-handle-event): call input-handle-key-press-event
	(read-key-or-selection-handle-event): new function
	(read-key-or-selection): likewise
	(read-one-line): call read-key-or-selection. handle selection
	strings.
	(input-kill-line): call set-x-selection
	(input-kill-to-beginning): likewise
	(input-insert-string): new function
	(input-insert-char): likewise
	(input-self-insert): call input-insert-char
	(input-yank-selection): new function

	* core.lisp (:selection-request): new event handler
	(:selection-clear): likewise
	(export-selection): new function
	(set-x-selection): likewise
	(send-selection): likewise

	* user.lisp ("escape"): new command

2006-11-13  Shawn Betts  <sabetts@vcn.bc.ca>

	* user.lisp ("ratwarp"): new command
	("ratrelwarp"): likewise
	("loadrc"): new command

	* core.lisp (warp-pointer-relative): new function

2006-11-10  Shawn Betts  <sabetts@vcn.bc.ca>

	* stumpwm.lisp (stumpwm): work around sbcl's putenv bug

2006-11-09  Shawn Betts  <sabetts@vcn.bc.ca>

	* core.lisp (:mapping-notify): update clx's key mappings

2006-11-05  Shawn Betts  <sabetts@vcn.bc.ca>

	* core.lisp (maximize-window): set the window's position to 0,0

	* mode-line.lisp (mode-line-format-elt): ignore errors when calling eval.

2006-10-23  Shawn Betts  <sabetts@vcn.bc.ca>

	* mode-line.lisp (mode-line-format-elt): ignore errors for :eval

2006-10-23  Shawn Betts  <sabetts@shitbender.gagrod>

	* user.lisp (*root-map*): bind "o" to fnext
	(horiz-split-frame): update window border color
	(vert-split-frame): likewise
	(remove-split): likewise
	("only"): likewise
	(focus-frame-after): new function
	(focus-next-frame): likewise
	(focus-prev-frame): likewise
	("fnext"): new command

	* stumpwm.lisp (init-atoms): intern wm_take_focus atom
	(stumpwm-internal-loop): produce debug output when ungrab is called
	(stumpwm-internal-loop): format error with ~a

	* primitives.lisp (*normal-border-width*): set to 1
	(*focus-color*): new global variable
	(*unfocus-color*): likewise
	(*window-parent-events*): likewise

	* mode-line.lisp (mode-line): new slot, position
	(*mode-line-border-width*): new global variable
	(*mode-line-pad-x*): likewise
	(*mode-line-pad-y*): likewise
	(*mode-line-background-color*): likewise
	(*mode-line-foreground-color*): likewise
	(*mode-line-border-color*): likewise
	(*screen-mode-line-format*): likewise
	(make-mode-line-window): set border color and width
	(resize-mode-line-for): new function
	(mode-line-format-elt): new method
	(mode-line-format-elt): handle new list cases
	(mode-line-format-string): just call mode-line-format-elt on
	mode-line-format
	(make-mode-line-gc): set the foreground according to mode-line colors
	(make-screen-mode-line): set position slot
	(redraw-mode-line-for): dont resize window
	(toggle-mode-line): new function
	("mode-line"): call toggle-mode-line

	* core.lisp (screen-height): use true-height
	(find-screen): use xlib:window-equal
	(update-window-border): new function
	(true-height): likewise
	(true-width): likewise
	(window-screen-safe): likewise
	(def-window-attr): new macro
	(:number): replace window-number and set-window-number
	(:frame): replace window-frame and set-window-frame
	(:parent): new window attribute
	(:unmap-ignores): likewise
	(unhide-window): map window's parent
	(hide-window): unmap window's parent
	(geometry-hints): adjust for window's parent border window
	(reparent-window): new defun
	(add-window): init window-unmap-ignores
	(process-mapped-window): rename from absorb-mapped-window
	(process-mapped-window): reparent window
	(remove-window): delete window parent
	(focus-window): update windows' border color
	(grow-tree): remove function
	(grow-frames): likewise
	(internal-window-p): add input frame and focus windows.
	(echo-string): handle newlines
	(:unmap-notify): don't unmap if window-unmap-ignores is > 0
	(:destroy-notify): remove the window only if the window's screen
	can be found

2006-10-17  Shawn Betts  <sabetts@vcn.bc.ca>

	* user.lisp (run-shell-command): allow output to be collected.

	* primitives.lisp (run-prog-collect-output): new function

	* input.lisp (input-forward-word): use position-if-not
	(input-backward-word): likewise

2006-10-16  Shawn Betts  <sabetts@vcn.bc.ca>

	* stumpwm.lisp (stumpwm-internal-loop): set *debugger-hook* to a function that ungrabs the pointer

2006-10-15  Shawn Betts  <sabetts@vcn.bc.ca>

	* input.lisp (input-forward-word): new function
	(input-backward-word): likewise
	*input-map*: bind input-forward-word and input-backward-word

	* user.lisp (fmt-screen-window-list): new function
	("only"): use screen-x screen-y screen-width and screen-height
	(interactive-command): update the modeline 

	* stumpwm.asd (:stumpwm): add mode-line

	* primitives.lisp (screen): add mode-line

	* core.lisp (screen-x): new function
	(screen-y): likewise
	(screen-height): adjust the screenheight for the modeline
	(make-initial-frame): take an x and y as well. all callers updated.
	(sync-all-frame-windows): new function
	(offset-frames): likewise
	(grow-tree): likewise
	(grow-frames): likewise
	(screen-root): likewise

	* primitives.lisp (char->keysym): remove unused function

	* input.lisp (is-modifier): moved from primitives.lisp

2006-10-09  Shawn Betts  <sabetts@vcn.bc.ca>

	* input.lisp (*input-map*): add arrow key bindings
	populate *input-map* with bindings when it's nil.

2006-10-05  Shawn Betts  <sabetts@vcn.bc.ca>

	* core.lisp (*top-map*): init to nil
	populate *top-map* with bindings when it's nil.
	
	* user.lisp (*root-map*): swap hsplit and vsplit bindings.
	(*root-map*): init to nil
	populate *root-map* with bindings when it's nil.

2006-10-03  Shawn Betts  <sabetts@vcn.bc.ca>

	* primitives.lisp (run-prog): for sbcl and cmucl let the
	subprocess inherit the stdout and stderr streams of the current
	process.

2006-09-28  Shawn Betts  <sabetts@vcn.bc.ca>

	* version.lisp (*version*): new defvar
	(echo-version): new function
	("version"): new command

	* user.lisp (*root-map*): bind v to version

	* stumpwm.asd (:stumpwm): add version.lisp

2006-09-27  Shawn Betts  <sabetts@vcn.bc.ca>

	* sample-stumpwmrc.lisp: add example of changing prefix key.

	* user.lisp (set-prefix-key): verify the KEY's type.

2006-09-26  Shawn Betts  <sabetts@vcn.bc.ca>

	* user.lisp ("shell"): use xterm

	* core.lisp (expand-frame): dont quote symbols in ecase
	(expand-tree): likewise
	(resize-frame): likewise

	* user.lisp (run-or-raise): new function
	("shell"): new command
	("web"): new command

2006-08-30  Shawn Betts  <sabetts@vcn.bc.ca>

	* user.lisp ("only"): hide windows not in the focused frame.
	(choose-frame-by-number): use get-frame-number-translation to
	search for a matching frame
	(parse-and-run-command): likewise

	* primitives.lisp (*focus-frame-hook*): new hook
	(*frame-number-map*): new global variable
	(get-frame-number-translation): new function

	* core.lisp (focus-frame): call *focus-frame-hook* hooks
	(draw-frame-numbers): use get-frame-number-translation for the frame's "id"

2006-08-17  Shawn Betts  <sabetts@vcn.bc.ca>

	* user.lisp (*root-map*): bind up, down, left, right to move focus in the corresponding direction.
	(find-closest-frame): new function
	("move-focus"): new command

2006-06-22  sabetts  <sabetts@vcn.bc.ca>

	* stumpwm.lisp (stumpwm): call update-modifier-map

	* primitives.lisp (*all-modifiers*): new global
	(*modifiers*): likewise
	(screen): remove modifiers slot

	* kmap.lisp (x11-mods): handle meta alt syper and super modifiers

	* input.lisp (code-state->key): handle meta alt syper and super modifiers
	(all-modifier-codes): new function
	(get-modifier-map): new function
	(update-modifier-map): call all-modifier-codes and get-modifier-map

	* core.lisp (:mapping-notify): new event handler

2006-05-07  Shawn Betts  <sabetts@vcn.bc.ca>

	* kmap.lisp (print-key): call keysym->stumpwm-name

	* keytrans.lisp (keysym-name->stumpwm-name): new function
	(keysym->stumpwm-name): likewise

2006-05-06  Shawn Betts  <sabetts@vcn.bc.ca>

	* input.lisp (*input-map*): use DEL to refer to the backspace
	key. New binding, Delete. use RET to refer to the return key.
	(input-self-insert): report an error if the keysym is not associated with a character

	* user.lisp (*root-map*): use SPC to refer to the space key

	* stumpwm.asd (:stumpwm): add keysyms and keytrans files and dependancies

	* primitives.lisp (char->keysym): call keysym-name->keysym
	(is-modifier): use keysym names

	* kmap.lisp (key): replace char slot with keysym. all callers updated.
	(parse-char-name): remove function
	(parse-key): call stumpwm-name->keysym 
	(print-key): call keysym->keysym-name

2006-05-02  Shawn Betts  <sabetts@vcn.bc.ca>

	* user.lisp (pull-window-by-number): set the pulled window's
	frame's window to null before raising the frame's new window.
	("only"): new command
	(*root-map*): bind "Q" to "only"

2006-04-29  Shawn Betts  <sabetts@vcn.bc.ca>

	* core.lisp (font-exists-p): new function
	(set-font): verify that the font exists first

	* package.lisp (:stumpwm): export #:set-border-color

	* core.lisp (set-fg-color): return nil if the color doesn't exist.
	(set-bg-color): likewise
	(set-border-color): likewise
	(color-exists-p): new function

2006-04-28  Shawn Betts  <sabetts@vcn.bc.ca>

	* user.lisp (*root-map*): bind - to fclear
	(other-window): choose the right window when the frame is empty
	(clear-frame): new function
	("fclear"): new command

	* core.lisp (maybe-hide-window): hide the window if new-window is nil
	(frame-raise-window): if w is nil clear the frame

2006-04-27  Shawn Betts  <sabetts@vcn.bc.ca>

	* user.lisp ("quit"): new command

	* stumpwm.lisp (stumpwm-internal-loop): catch a :quit tag

2006-04-16  Shawn Betts  <sabetts@vcn.bc.ca>

	* core.lisp (handle-rp-commands): convert the response string using map.

	* primitives.lisp (format-expand): unknown % formatters are printed verbatim.

	* core.lisp (window-name): call xlib:wm-name
	(window-class): call xlib:get-wm-class
	(window-res-name): likewise
	(handle-rp-commands): always return the bytes-after

	* user.lisp (parse-and-run-command): print the input as part of the error.

	* stumpwm.lisp (init-atoms): just set +wm-delete-window+. use
	xlib:intern-atom.

	* primitives.lisp (remove-hook): new macro
	(dformat): ignore the args

	* core.lisp (window-name): use get-property to convert the
	property value to a string.
	(window-class): likewise
	(window-res-name): likewise
	(bytes-to-window): new function
	(handle-rp-commands): likewise
	(:property-notify): new event handler
	(handle-event): don't warn about the error.

2006-04-15  Shawn Betts  <sabetts@vcn.bc.ca>

	* core.lisp (sync-keys): sync keys on the screen-focus-window.
	(init-screen): don't listen for :key-press events on
	focus-window. grab the keys on the focus-window.

2006-04-14  Shawn Betts  <sabetts@vcn.bc.ca>

	* user.lisp (*root-map*): bind C-h to "help"

	* primitives.lisp (*message-window-gravity*): new defvar
	(*input-window-gravity*): likewise

	* input.lisp (setup-input-window): dont set the drawable-y
	(draw-input-bucket): use setup-win-gravity

	* core.lisp (setup-win-gravity): new function
	(setup-message-window): use setup-win-gravity

	* user.lisp (*root-map*): bind C-N to "number"
	(display-keybinding): new function
	("help"): new command
	
	* primitives.lisp (*prefix-key*): remove defvar
	(*prefix-modifiers*): likewise
	(mapcar-hash): pass the fn both the key and value. callers updated.

	* core.lisp (init-screen): dont grab any keys on the root window
	(init-screen): list for :key-press events on the focus window
	(init-screen): don't grab any keys on the focus window

	* user.lisp (*root-map*): bind "t" to "meta t"
	(parse-and-run-command): parse keys
	(send-meta-key): take a key as argument
	("meta"): likewise
	(set-prefix-key): change the meta and other bindings

	* stumpwm.asd: require sb-posix for sbcl

	* core.lisp (ungrab-keys-on-window): specify :any for :modifiers
	(sync-keys): sync with the xserver after ungrabbing keys on a windows.
	(send-fake-key): accept a key structure as an argument

	* kmap.lisp (parse-char-name): Return the char-code of the
	name-char.

2006-04-07  Shawn Betts  <sabetts@vcn.bc.ca>

	* user.lisp (set-prefix-key): new function

	* stumpwm.lisp (load-rc-file): use ~s to report the error. not ~a.
	(stumpwm): when the rc file fails to load, report the error
	instead of showing a welcome message.

	* package.lisp (:stumpwm): export some functions

	* kmap.lisp (lookup-command): new function
	(undefine-key): likewise

	* input.lisp (*input-map*): rename from *input-keymap*. callers updated.

	* core.lisp (:key-press): unmap the message window after reading
	the key sequence.
	(ungrab-keys-on-window): dont pass a value for :modifiers to ungrab-key
	(sync-keys): call display-finish-output

	* primitives.lisp (+default-foreground-color+): change to defparameter
	(+default-background-color+): likewise
	(+default-border-color+): likewise
	(+default-font-name+): likewise

2006-04-06  Shawn Betts  <sabetts@vcn.bc.ca>

	* user.lisp (*root-map*): add bindings for C-c and C-e

	* stumpwm.lisp (stumpwm-internal-loop): catch errors and handle
	them according to *top-level-error-action*.
	(stumpwm): echo startup string after rc file is loaded

	* stumpwm.asd: attempt to require :cmucl-clx

	* sample-stumpwmrc.lisp: bring up to date

	* primitives.lisp (*font-name*): remove defvar
	(*foreground-color*): likewise
	(*background-color*): likewise
	(*border-color*): likewise
	(+default-foreground-color+): new constant
	(+default-background-color+): likewise
	(+default-border-color+): likewise
	(+default-font-name+): likewise
	(*top-level-error-action*): new defvar
	(screen): new slots border-color, fg-color, bg-color

	* core.lisp (focus-window): catch match-error, window-error, and
	drawable-errors.
	(set-fg-color): new function
	(set-bg-color): likewise
	(set-border-color): likewise
	(set-font): likewise
	(get-fg-color-pixel): use screen's fg-color slot
	(get-bg-color-pixel): use screen's bg-color slot
	(get-border-color-pixel): use screen's border-color slot
	(init-screen): use +default-foreground-color+,
	+default-background-color+ +default-border-color+.
	(init-screen): init screen's fg-color, bg-color, border-color and font slots

2006-04-01  Shawn Betts  <sabetts@vcn.bc.ca>

	* core.lisp (grab-keys-on-window): grab the keyboard synchronously.

2006-03-30  Shawn Betts  <sabetts@vcn.bc.ca>

	* primitives.lisp (run-prog): dont warn on sbcl.

2006-03-29  Andreas Scholta <andreas.scholta@gmail.com>

	* primitives.lisp (getenv): use SB-POSIX:GETENV. Wrap VAR in
	STRING.
	(setf getenv): use SB-POSIX:PUTENV for sbcl.

	* stumpwm.lisp (stumpwm): set the DISPLAY var on sbcl.

2006-03-29  Shawn Betts  <sabetts@vcn.bc.ca>

	* core.lisp (window-type): check if hints is nil
	(geometry-hints): likewise
	(define-stump-event-handler): dont catch any errors
	(:configure-request): likewise
	(handle-event): catch drawable-error and window-error errors.

	* primitives.lisp (*foreground-color*): new defvar
	(*background-color*): likewise
	(*border-color*): likewise

	* input.lisp (draw-input-bucket): use invert-rect

	* core.lisp (reparent-window): use get-bg-color-pixel
	(get-color-pixel): new function
	(get-fg-color-pixel): likewise
	(get-bg-color-pixel): likewise
	(get-border-color-pixel): likewise
	(create-message-window-gcontext): use get-bg-color-pixel and
	get-fg-color-pixel
	(draw-frame-outlines): likewise
	(draw-frame-numbers): likewise
	(show-frame-indicator): likewise
	(create-inverse-gcontext): remove function
	(invert-rect): properly invert the colors
	(update-colors-for-screen): new function
	(update-colors-all-screens): likewise
	(init-screen): use *foreground-color* *background-color* and
	*border-color* for window colors

2006-03-28  Shawn Betts  <sabetts@vcn.bc.ca>

	* user.lisp (choose-frame-by-number): call draw-frame-outlines

	* core.lisp (draw-frame-outlines): new function
	(clear-frame-outlines): likewise

	* user.lisp (pull-window-by-number): get the window's frame after
	it's confirmed the window isn't nil.

	* core.lisp (raise-window): new function
	(maybe-hide-window): likewise
	(focus-window): call raise-window and maybe-hide-window
	(frame-raise-window): call maybe-hide-window and raise-window

	* primitives.lisp (dformat): ignore debug output

	* core.lisp (:map-request): don't absorb already managed windows

2006-03-25  Shawn Betts  <sabetts@shitbender.gagrod>

	* stumpwm.lisp (stumpwm): use ' not #' in mapc.

	* primitives.lisp (*window-format-fn*): remove defvar
	(*maxsize-border-width*): new defvar
	(*transient-border-width*): likewise
	(*normal-border-width*): likewise
	(*window-events*): likewise

	* core.lisp (window-border-width): new function
	(setf window-border-width): likewise
	(default-border-width-for-type): likewise
	(unhide-window): likewise
	(hide-window): likewise
	(window-type): likewise
	(process-new-window): use *window-events*
	(process-existing-windows): hide all absorbed windows
	(absorb-mapped-window): give window a default border width
	(focus-window): properly get the currently focused window. dont do
	anything if its already focused. hide the currently focused
	window.
	(define-stump-event-handler): catch drawable-error's.
	(:configure-request): don't use parent or above-sibling args
	(:map-request): dont use parent arg
	(:unmap-notify): dont use configure-p arg. ignore the proper event type.
	(:create-notify): dont use parent window x y width height or border-width args
	(:key-press): dont use window args

2006-03-25  Shawn Betts  <sabetts@vcn.bc.ca>

	* core.lisp (frame-raise-window): handle the case when w is nil.

	* stumpwm.lisp (stumpwm-internal-loop): flush output after processing events.

	* input.lisp (code-state->key): use #\Null if no keysym to char mapping exists.

	* user.lisp (*root-map*): bind C-g to abort, not g.
	(send-meta-key): don't send a key if there's no current window
	(other-window): display an error message when no other window can be selected

	* core.lisp (handle-keymap): accept a code and state. read the
	next key when its a keymap. return the key sequence for the
	command.
	(:key-press): call display-force-output after ungrabbing the
	pointer and keyboard. do not lookup the command. print the key
	sequence if no command was found.

	* stumpwm.lisp (stumpwm): give display-str a default value.

2006-03-24  Shawn Betts  <sabetts@vcn.bc.ca>

	* stumpwm.lisp (stumpwm): remove &key

	* input.lisp (read-one-line): remove done var

	* core.lisp (*top-map*): moved from user.lisp
	(tree-x): dont accept a screen arg. all callers updated.
	(tree-y): likewise
	(tree-width): likewise
	(tree-height): likewise
	(tree-row-split): likewise
	(tree-column-split): likewise
	(expand-tree): likewise
	(join-subtrees): likewise
	(remove-frame): likewise

2006-03-10  Shawn Betts  <sabetts@vcn.bc.ca>

	* user.lisp (remove-split): sync all frames
	("resize"): new command
	(*root-map*): bind "Space" not " "

	* core.lisp (tree-iterate): new function
	(join-subtrees): tighten up code
	(depth-first-search): new function
	(spree-root-branch): likewise
	(resize-frame): likewise

2006-03-03  Shawn Betts  <sabetts@vcn.bc.ca>

	* user.lisp (*root-map*): bind "c" to "exec xterm". bind "other" to C-t

	* kmap.lisp (parse-char-name): return the char-code

	* input.lisp (code-state->key): store char as a char-code. all callers updated.

	* core.lisp (:key-press): make sure cmd isn't nil

2006-03-02  Shawn Betts  <sabetts@vcn.bc.ca>

	* core.lisp (ungrab-keys-on-window): pass :any correctly.
	(grab-keys-on-window): grab all keybindings in *top-map*
	(sync-keys): new defun
	(handle-keymap): new defun
	(handle-command-key): remove defun
	(:key-press): lookup key event in *top-map* and execute matching command.

	* kmap.lisp (x11-mods): new defun

	* primitives.lisp (key-binding): remove defstruct
	(*key-bindings*): remove defvar

	* stumpwm.lisp (stumpwm): do not call set-key-binding

	* user.lisp (*root-map*): new key map
	(set-key-binding): remove defun
	("curframe"): new command
	("echo"): likewise
	(set-default-bindings): remove defun

	* stumpwm.lisp (stumpwm-internal-loop): listen for events and process them when they come in.

	* core.lisp (frame-raise-window): don't do anything if w is nil
	(expand-frame): use ecase
	(expand-tree): properly expand the tree to take up the space.
	(join-subtrees): properly obtain AMOUNT.
	(expand-tree): make it work for expand to the 'right and 'bottom

2006-03-01  Shawn Betts  <sabetts@vcn.bc.ca>

	* user.lisp (vert-split-frame): call show-frame-indicator with screen
	(select-window): raise the window in its frame.

	* primitives.lisp (*internal-loop-hook*): new hook

	* stumpwm.lisp (stumpwm-internal-loop): run the *internal-loop-hook* hook

	* core.lisp (frame-raise-window): new argument focus. simply raise
	the frame's window if focus is NIL.
	(maximize-window): use floor instead of truncate.

	* user.lisp (horiz-split-frame): call show-frame-indicator
	(vert-split-frame): likewise
	(remove-split): likewise
	(focus-frame-sibling): likewise
	("fselect"): likewise
	(pull-window-by-number): give the old frame a new window if it's
	focused window is being pulled.
	(renumber): remove useless error message.

	* stumpwm.lisp (load-rc-file): use user-homedir-pathname
	(stumpwm-internal-loop): call unmap-all-frame-indicators

	* primitives.lisp (*timeout-frame-indicator-wait*): new defun
	(*timeout*): add doc string
	(reset-timeout-for-frame-indicator): new defun
	(font-height): likewise

	* core.lisp (process-new-window): use +normal-state+
	(split-frame-v): use frame-y for :y
	(unmap-frame-indicator): new defun
	(unmap-all-frame-indicators): likewise
	(show-frame-indicator): likewise
	(echo-in-window): use font-height
	(init-screen): give frame-window a 1 pixel border

2006-01-26  Shawn Betts  <sabetts@vcn.bc.ca>

	* primitives.lisp (*window-formatters*): add %i formatter

	* core.lisp (fmt-window-status): new function
	(default-window-format): remove function
	(window-number): do not require the screen. all callers updated.
	(set-window-number): likewise
	(window-class): properly extract the resource class
	(window-res-name): new function

	* user.lisp (echo-windows): take a format arg. call format-expand
	to format the window list.

	* primitives.lisp (dformat): new function
	(format-expand): new function
	(*window-formatters*): new variable
	(*window-format*): likewise

	* core.lisp (geometry-hints): correctly center maxsize and transient windows.
	(geometry-hints): honour aspect hints

	* input.lisp (input-line): new defstruct
	(*input-keymap*): new keybindings
	(*input-history*): new var
	(make-input-string): new function
	(read-one-line): use the input-line structure
	(draw-input-bucket): likewise. draw a cursor position. flash briefly on error.
	(input-delete-backward-char): new function
	(input-delete-char): remove function
	(input-delete-forward-char): new function
	(input-forward-char): likewise
	(input-backward-char): likewise
	(input-move-beginning-of-line): likewise
	(input-move-end-of-line): likewise
	(input-kill-line): likewise
	(input-kill-to-beginning): likewise
	(input-history-back): likewise
	(input-history-forward): likewise
	(input-submit): just return :done
	(input-self-insert): use input-line structure.
	(process-input): likewise

	* core.lisp (create-message-window-gcontext): only supply the foreground color.
	(create-inverse-gcontext): new function

2006-01-25  Shawn Betts  <sabetts@vcn.bc.ca>

	* user.lisp (parse-and-run-command): fix macro expansion bug. only
	parse-integer when the argument is a string.

	* stumpwm.lisp (init-atoms): init +wm-state+ and +wm-protocols+

	* stumpwm.asd (:stumpwm): add kmap

	* primitives.lisp (+wm-state+): new var
	(+wm-protocols+): likewise
	(split-string): new function

	* input.lisp (*input-keymap*): new var
	(read-one-line): make input a string
	(code-state->key): new function
	(input-delete-char): likewise
	(input-submit): likewise
	(input-abort): likewise
	(input-self-insert): likewise
	(process-input): use keymaps to find key actions

2006-01-23  Shawn Betts  <sabetts@vcn.bc.ca>

	* stumpwm.lisp (stumpwm): set the display env. variable

	* primitives.lisp (setf getenv): new function

	* user.lisp (run-shell-command): call our own run-prog function

	* stumpwm.lisp (stumpwm): call our own getenv function

	* primitives.lisp (remove-plist): new function
	(run-prog): likewise
	(getenv): likewise

2004-11-30  Shawn Betts  <sabetts@vcn.bc.ca>

	* user.lisp (command): new defstruct
	(*command-hash*): new defvar
	(define-stumpwm-command): new macro
	(set-key-binding): change 3rd arg to cmd
	("next"): new stumpwm command
	("prev"): likewise
	("delete"): likewise
	("kill"): likewise
	("banish"): likewise
	("windows"): likewise
	("select"): likewise
	(shell-command): remove function
	("other"): new stumpwm command
	(run-shell-command): new function
	("exec"): new stumpwm command
	("hsplit"): likewise
	("vsplit"): likewise
	(remove-split): use format for debugging output
	("remove"): new stumpwm command
	("sibling"): likewise
	(choose-frame-by-number): new function
	("fselect"): new stumpwm command
	(eval-line): take the expression to eval as the second arg
	("eval"): new stumpwm command
	(split-by-one-space): new function
	(parse-and-run-command): likewise
	(interactive-command): new function
	("colon"): new stumpwm command
	("pull"): likewise
	("meta"): likewise
	(renumber): take the new number as arg #2
	("number"): new stumpwm command
	("reload"): likewise
	(set-default-bindings): bind keys to stumpwm commands
	("abort"): new stumpwm command
	(set-default-bindings): bind ; to colon and : to eval.
	(select-window): don't read a line from the user. Get it as the
	second arg. All callers updated.

	* stumpwm.lisp (load-rc-file): change ~/.stumpwmrc path to be more portable.
	(error-handler): use format for debugging output

	* primitives.lisp (*key-bindings*): change to defvar.
	(find-free-number): use format for debugging output

	* input.lisp (setup-input-window): use format for debugging output
	(shutdown-input-window): likewise

	* core.lisp (process-existing-windows): use format for debugging output
	(no-focus): likewise
	(delete-window): likewise
	(kill-window): likewise
	(focus-frame): likewise
	(sync-frame-windows): likewise
	(draw-frame-numbers): likewise
	(:configure-request): likewise
	(handle-command-key): likewise
	(:key-press): likewise
	(handle-event): likewise
	(echo-string-list): force output

2004-11-12  Shawn Betts  <sabetts@vcn.bc.ca>

	* primitives.lisp (screen): remove frame-hash. all dependant code
	updated.

2004-10-10  Shawn Betts  <sabetts@vcn.bc.ca>

	* user.lisp (set-default-bindings): add a binding for
	kill-current-window.
	(focus-forward): only focus the window, nw, if it is non-null.
	(kill-current-window): new function

	* stumpwm.lisp (stumpwm): if the display string isn't provided and
	there's no DISPLAY env var then use :0 when opening the display.
	(stumpwm): don't set an error handler.
	(stumpwm): catch the xlib error telling us another window manager
	is running and return from the function.

	* core.lisp (focus-window): wrap the function in a handler-case to
	catch drawable-error.
	(kill-window): new function

	* stumpwm.lisp (load-rc-file): new function
	(stumpwm): echo a welcome message. Load the rc file and display
	any errors that occurred while loading it.

2004-10-08  Shawn Betts  <sabetts@vcn.bc.ca>

	* stumpwm.lisp (parse-display-string): new function
	(stumpwm): take an optional display string as an argument and
	parse it. If it is nil then use the DISPLAY environment variable.

	* core.lisp (send-client-message): new function
	(window-name): use coerce to turn it into a string
	(window-class): new function
	(maximize-window): use multiple-value-bind to bind variables to
	the hints returned by geometry-hints
	(geometry-hints): return the hints using #'values
	(focus-window): send a wm-take-focus client message
	(delete-window): use send-client-message to send the delete window
	client message

	* primitives.lisp (+wm-take-focus+): new atom
	(*editor-bindings*): properly initialize it to nil

	* stumpwm.lisp (init-atoms): initialize +wm-take-focus+

	* user.lisp (focus-frame-sibling): Only give focus to the sibling
	if one exists.

2004-04-15  Shawn Betts  <sabetts@vcn.bc.ca>

	* core.lisp (process-new-window): set the window state to normal
	(process-existing-windows): don't process internal windows
	(process-existing-windows): print the name of the window being
	processed
	(internal-window-p): new function
	(init-screen): grab the prefix key on the focus window. don't
	listen for any events on the focus-window.

2004-02-29  Shawn Betts  <sabetts@vcn.bc.ca>

	* core.lisp (split-frame): don't give the new frame a window

	* Added frame support.

2003-11-15  Shawn Betts  <sabetts@vcn.bc.ca>

	* stumpwm.asd (:stumpwm): update system description to reflect new
	file names.

2003-10-16  Shawn Betts  <sabetts@vcn.bc.ca>

	* stumpwm.lisp (stumpwm-internal-loop): handle a timer. Call
	unmap-all-message-windows when the timer times out.

	* stumpwm-user.lisp (echo-windows): echo a message when there are
	no managed windows.

	* stumpwm-primitives.lisp (*timeout-wait*): new variable
	(*timeout*): likewise
	(reset-timeout): new function
	(screen): remove key-window slot. All dependant code removed.

	* stumpwm-core.lisp (unmap-message-window): new function
	(unmap-all-message-windows): likewise
	(echo-string-list): call reset-timeout
	(current-screen): check the screen's root window for focus.
	(init-screen): grab the prefix key on the root window
	(grab-keyboard): new function
	(ungrab-keyboard): likewise
	(:key-press): call unmap-message-window
	(:key-press): call grab-keyboard
	(:key-press): call ungrab-keyboard

	* stumpwm.lisp (stumpwm): call set-default-bindings

2003-10-13  Shawn Betts  <sabetts@vcn.bc.ca>

	* stumpwm-user.lisp (shell-command): use *shell-program*

	* stumpwm-primitives.lisp (*shell-program*): new defvar

	* stumpwm.lisp (stumpwm): run *start-hook*

	* stumpwm-user.lisp (set-key-binding): rename from set-key.
	(set-default-bindings): new function
	(shell-command): likewise

	* stumpwm-primitives.lisp (*start-hook*): new hook
	(*key-bindings*): rename from key-binding-alist. init to an empty
	hash table. All callers updated.

	* stumpwm-core.lisp (handle-command-key): use keycode->character.

	* stumpwm.asd (:stumpwm): add "package" dependency for "stumpwm-primitives"

2003-10-12  Shawn Betts  <sabetts@vcn.bc.ca>

	* stumpwm.asd: Create an ASDF package.

2003-09-22  Shawn Betts  <sabetts@vcn.bc.ca>

	* stumpwm-input.lisp (read-key): remove screen argument. All
	callers updated.
	(read-key-handle-event): declare display as ignorable.
	(read-key-handle-event): in key-press, declare event-slots and
	root as ignorable.

	* stumpwm.lisp (*window-format-fn*): bound to
	default-window-format
	(*key-binding-alist*): bind #\a to echo-date
	(mapcar-hash): declare key as ignorable in lambda fn
	(default-window-format): new function
	(find-free-window-number): remove window parameter
	(process-existing-windows): call absorb-mapped-window. give the
	first window in the mapped window list focus.
	(echo-string-list): new function
	(echo-window-list): remove
	(echo-string): new function
	(:configure-request): focus the window if a :bave stack-mode
	request was made.
	(:map-request): call absorb-mapped-window
	(absorb-mapped-window): new function
	(handle-events): remove function
	(stumpwm-internal-loop): call xlib:process-event directly.
	(error-handler): correctly detect another WM running and signal an
	error.
	(:destroy-notify): call remove-window.
	(:unmap-notify): call remove-window
	(remove-window): new function
	(add-window): add a window-table entry and the window's new
	number.

	* stumpwm-user.lisp (echo-windows): call echo-string-list
	(echo-date): new function.

2003-09-18  Shawn Betts  <sabetts@vcn.bc.ca>

	* stumpwm-user.lisp (select-window): pass a prompt to
	read-one-line.

	* stumpwm-input.lisp (setup-input-window): add prompt
	argument. call draw-input-bucket.
	(read-one-line): add prompt argument.
	(process-input): likewise
	(draw-input-bucket): add prompt argument. Draw the prompt.


	* stumpwm.lisp (init-screen): select events on the root window
	first.
	(error-handler): new function
	(stumpwm): set the display's error handler

	* stumpwm-input.lisp (keycode->string): use keysym->character.
	(read-one-line): renamed from read-line. Callers updated.

	* stumpwm.lisp (handle-unmap-notify): remove the window's entry in
	screen-window-table.
	(char->keysym): new function. All xlib:keysym callers use this.

	* stumpwm-input.lisp (read-key-handle-event): return a (code . state) pair.
	(read-key): new function
	(read-line): likewise
	(draw-input-bucket): likewise
	(process-input): likewise
	(handle-key): remove function
	(read-input): remove function

	* stumpwm-user.lisp (focus-next-window): call sort-windows
	(focus-prev-window): likewise
	(echo-windows): likewise
	(select-window): don't search for a match if the user input was
	().
	(select-window-number): new function
	(other-window): likewise

	* stumpwm.lisp (*window-format-fn*): new global
	(*key-binding-alist*): add commands on #\g, #\0-9, #\t, and #\'.
	(screen): remove input-bucket slot
	(sort1): new function
	(mapcar-hash): likewise
	(window-name): return the name as a string.
	(window-number): new function
	(sort-windows): likewise
	(handle-map-request): create the window-table hash table for the
	new window.
	(handle-key-press): call read-key.
	(find-free-window-number): new function
	(add-window): likewise
	(move-window-to-head): likewise
	(current-screen): call xlib:window-equal.
	(echo-window-list): use *window-format-fn* to format the window
	strings.

2003-09-17  Shawn Betts  <sabetts@vcn.bc.ca>

	* stumpwm.lisp (*key-binding-alist*): add select-window
	(key-binding): new structure
	(*editor-bindings*): new global
	(modifiers): new structure
	(screen): add input-bucket, modifiers and font slots
	(conc1): new function
	(init-screen): set the input-window's background to black, border
	to white and border-width to 1.
	(init-screen): init font and input-bucket
	(*event-fn-table*): new global
	(define-stump-event-handler): new macro
	(:map-notify): new event handler
	(:configure-request): likewise
	(:map-request): likewise
	(:unmap-notify): likewise
	(:create-notify): likewise
	(:destroy-notify): likewise
	(:key-press): likewise
	(handle-event): new function
	(handle-events): use xlib:process-event and handle-event to
	process events.
	(handle-configure-request): check the value-mask before setting
	the attribute. New function argument, stack-mode.
	(create-message-window-gcontext): remove font function
	argument. Use screen-font instead.
	(setup-message-window): likewise
	(echo-window-list): likewise

	* stumpwm-user.lisp (select-window): new function

	* stumpwm-input.lisp (read-key-handle-event): new function
	(read-line): likewise
	(setup-input-window): likewise
	(shutdown-input-window): likewise
	(update-modifier-map): likewise
	(x11mod->stumpmod): likewise
	(mod->string): likewise
	(keycode->string): likewise
	(cook-keycode): likewise
	(keycode->character): likewise
	(handle-key): likewise
	(read-input): likewise

2003-09-13  Shawn Betts  <sabetts@vcn.bc.ca>

	* stumpwm.lisp (geometry-hints): truncate the values where
	division is used.

2003-07-21  Shawn Betts  <sabetts@sfu.ca>

	* stumpwm.lisp (#:stumpwm): change package name from stump.
	(stumpwm): change name from stump
	(stumpwm-internal-loop): change name from stump-internal-loop.

	* stumpwm-user.lisp: define everything in package #:stumpwm

2003-06-12  Shawn Betts  <sabetts@sfu.ca>

	* stumpwm-user.lisp (set-key): new function
	(focus-next-window): moved from stumpwm.lisp
	(focus-prev-window): likewise
	(focus-forward): likewise
	(banish-pointer): likewise
	(delete-current-window): likewise
	(echo-windows): likewise
	(focus-forward): call focus-window
	(delete-current-window): call delete-window.

	* stumpwm.lisp (*map-window-hook*): new hook
	(*unmap-window-hook*): likewise
	(*new-window-hook*): likewise
	(*destroy-window-hook*): likewise
	(*focus-window-hook*): likewise
	(*unfocus-window-hook*): likewise
	(screen-height): new function
	(screen-width): likewise
	(window-name): likewise
	(focus-window): likewise
	(current-screen): likewise
	(warp-pointer): likewise
	(echo-window-list): call window-name
	(delete-window): likewise

2003-06-11  Shawn Betts  <sabetts@sfu.ca>

	* stumpwm.lisp (*message-window-padding*): new variable.
	(init-screen): fix bug assigning white to the black pixel.
	(stump): wrap everything after opening the X display in an
	unwind-protect.
	(stump-internal-loop): remove unwind-protect code.
	(setup-message-window): renamed from resize-message-window. clear
	the window. properly calculate location. use
	(handle-map-request): maximize the window before mapping it.

	*message-window-padding*.
	(invert-rect): new function
	(echo-window-list): highlight the current window
	(geometry-hints): return x and y. handle transient windows by
	centering them with their current size attributes.
	(maximize-window): get the position from geometry-hints as well.
	(handle-configure-request): use a single setf to honour request.


2003-06-10  Shawn Betts  <sabetts@sfu.ca>

	* stumpwm.lisp (#:stump): export stump
	(init-screen): create the message window with a black background.
	(handle-key-press): force output before handling the key.
	(create-message-window-gcontext): new function
	(max-width): likewise
	(resize-message-window): likewise
	(echo-window-list): likewise
	(echo-windows): call echo-window-list
	(echo-window-list): pass the correct list to resize-message-window

