2004-11-30  Shawn Betts  <katia_dilkina@verizon.net>

	* 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  <katia_dilkina@verizon.net>

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

2004-10-10  Shawn Betts  <katia_dilkina@verizon.net>

	* 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  <katia_dilkina@verizon.net>

	* 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

