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

