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

	* src/events.c (handle_key): call XAllowEvents

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

	* src/input.c (grab_key): grab the keyboard synchronously


2006-03-16  Ryan Yeske  <rcyeske@gmail.com>

	* doc/ratpoison.texi (Groups): Fix description of gnew command.

2006-03-15  Bernhard R. Link  <brlink@debian.org>

	* src/screen.c (screen_update): new function
	(init_screen): listen for screen resizes
	* src/screen.h: new prototype

	* src/events.c (configure_notify): new function
	(delegate_event): call configure_notify for ConfigureNotify events

	* src/frame.c (frame_dump): remember the size of the screen the
	frame coordinates are relative to.
	(frame_restore): adopt coordinates to possible screen resizes.

	* src/frame.h (frame_fump): take a screen argument
	(frame_read): likewise

	* src/actions.c (cmd_tmpwm): listen for screen resizes again
	(fdump, frestore, cmd_fdump): supply screen to frame_dump, frameread

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

	* src/main.c (clean_up): use list_size not rp_num_frame_undos

	* src/globals.c: remove global var rp_num_frame_undos. All callers updated.

	* src/actions.c (push_frame_undo): use list_size, not rp_num_frame_undos
	(set_maxundos): likewise

	* src/window.c (_XOPEN_SOURCE): new define

	* src/screen.c (is_a_root_window): w is unsigned int
	(init_screen): typecast _net_wm_pid as unsigned char*.

	* src/main.c (read_rc_file): linesize is size_t

	* src/frame.c (frame_read): use a temp var when reading the
	:dedicated value.

	* src/bar.c (max_line_length): i and start are size_t
	(draw_string): i is size_t
	(get_mark_box): mark_start and mark_end are size_t

	* src/actions.c (find_keybinding): state is unsigned int
	(remove_keybinding): likewise
	(frame_selector): n is unsigned int
	(frame_selector_match): i is size_t. typecast comparison as size_t.

	* src/bar.c (show_bar): accept a fmt argument. all callers and prototype updated.
	(update_bar): just display the last message if bar isn't hidden.
	(update_window_names): accept a fmt argument. all callers and prototype updated.

	* src/actions.c (init_user_commands): add optional argument to "info"
	(cmd_info): handle optional argument
	(cmd_windows): when called interactively use the argument as the format string.

2006-03-14  Antti Nyknen <aon@iki.fi>

	* src/format.c: new file

	* src/format.h: new file

	* Makefile.am (ratpoison_SOURCES): add format.c and format.h

	* src/actions.c (set_infofmt): new function
	(wingravity_to_string): char * instead of static char * because	needed in format.c
	(cmd_info): use format_string

	* src/actions.h (wingravity_to_string): add prototype

	* src/data.h (info_fmt): new variable

	* src/main.c (init_defaults): set a value for defaults.info_fmt

	* src/ratpoison.h: include format.h

	* src/windows.c (get_window_list): use format_string
	(isdigit): remove function as the formatting is now done in format.c
	(concat_width): likewise
	(format_window_name): likewise

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

	* src/manage.c (ungrab_top_level_keys): unconditionally ungrab every key.

	* src/events.c (mapping_notify): call ungrab_keys_all_wins and grab_keys_all_wins.

2006-04-10  Bernhard R. Link  <brlink@debian.org>

	* src/manage.c (maximize_transient,maximize_normal):
	  avoid divide by zero when resize increment is 0.

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

	* src/main.c (clean_up): properly free rp_frame_numset

	* src/editor.c (editor_enter): free line->buffer before setting it to the history expansion.

	* src/completions.c (completions_free): free the rp_completions struct too

	* src/actions.c (del_frame_undo): free the rp_frame_undo struct too.

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

	* src/editor.c (editor_insert): use memmove to make room for
	inserted string.

	* src/window.c (add_to_window_list): only change the window's
	group and frame if window_mapped is 0.

	* src/data.h (struct rp_child_info): new field window_mapped

	* src/actions.c (spawn): init window_mapped field in child_info.

2006-01-18  Bernhard R. Link  <brlink@debian.org>

	* src/events.c: look for _NET_WM_PID notify events and adopt the
	intended frame number accordingly.

	* src/window.c, src/window.h: make get_child_info accessible from
	events.c

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

	* src/conf.h (ASPECT_WINDOWS_ARE_TRANSIENTS): new define

	* src/manage.c (window_is_transient): new function
	(maximize_normal): honour aspect ratio hint

	* src/window.c (update_window_gravity): use maxsize_gravity for windows with aspect hints.
	(set_active_window_body): call window_is_transient

	* src/split.c (cleanup_frame): call window_is_transient

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

	* src/number.c (numset_add_num): store the ret val of
	numset_find_empty_cell in a variable and use it as an index into
	the numbers_taken array.

	* src/actions.c (cmd_curframe): return the frame number in
	non-interactive mode.

	* src/split.c (cleanup_frame): in the maxsize windows are
	transients check either the width or height must be less than the
	screen width/height (just like in windows.c).

2005-12-11  Shawn Betts  <sabetts@shitbender.gagrod>

	* src/manage.c (withdraw_window): call rp_delete_window_hook hook

	* src/globals.c: new hook rp_delete_window_hook

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

	* src/events.c (handle_signals): xsync after hiding all windows

	* src/manage.h (unhide_all_windows): new prototype

	* src/manage.c (unhide_all_windows): new function.

	* src/events.c (handle_signals): unhide windows before switching to a new wm

2005-10-22  Shawn Betts  <sabetts@shitbender.gagrod>

	* src/window.c (get_mouse_position): renamed from
	get_mouse_root_position. get pos relative to window.

2005-10-20  Shawn Betts  <sabetts@shitbender.gagrod>

	* src/window.c: include unistd.h
	(get_child_info): new function
	(add_to_window_list): get the window's client's pid if possible
	and assign the window the appropriate group and frame.
	(add_to_window_list): init intended_frame_number
	(save_mouse_position): save the position relative to the window
	(give_window_focus): restore the position relative to the window
	(set_active_window_body): put the window in the frame contained in
	intended_frame_number when appropriate.

	* src/screen.c (screen_find_frame_by_frame): new function
	(init_screen): add the net_supported atom to the root window.

	* src/main.c (main): init netwm atoms

	* src/group.c (groups_find_group_by_group): new function

	* src/globals.c (_net_wm_pid, _net_supported): new globals

	* src/data.h (struct rp_window): new field intended_frame_number.
	(struct rp_child_info): new fields group, frame, screen.

	* src/actions.c (spawn): call the command directly when new
	argument, raw, is non zero. all callers updated.
	(spawn): fill in the frame, group and screen for the child.

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

	* src/actions.c (cmd_describekey): print the key name even when it's bound.

2005-08-23  Shawn Betts  <sabetts@vcn.bc.ca>

	* src/actions.c (cmd_addhook): remove erroneous call to free.

	* contrib/Makefile.am (pkgdata_DATA): add unrat.c
	(EXTRA_DIST): likewise

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

	* src/editor.c (edit_bindings): add C-h and C-m

2005-06-11  Shawn Betts  <sabetts@shitbender.gagrod>

	* src/main.c (clean_up): call del_frame_undo not pop_frame_undo

	* src/globals.h: new global prototype rp_frame_redos

	* src/globals.c: new global rp_frame_redos

	* src/actions.h: new command 'undo'
	(del_frame_undo): new prototype
	(pop_frame_undo): delete prototype

	* src/actions.c (init_user_commands): new command 'undo'
	(clear_frame_redos): new function
	(del_frame_undo): likewise
	(push_frame_undo): call del_frame_undo instead of pop_frame_undo. call clear_frame_redos.
	(pop_frame_list): new function
	(pop_frame_undo): returns the popped frame. all callers updated.
	(pop_frame_redo): new function
	(initialize_default_keybindings): bind undo to u and C-u, bind redo to U.
	(set_maxundos): call del_frame_undo instead of pop_frame_redo
	(cmd_redo): new function

2005-06-11  Shawn Betts  <sabetts@vcn.bc.ca>

	* src/actions.h: remove the non-existant command, last.

	* src/window.c (isdigit): new function
	(format_window_name): read a length argument and crop window names to that length.
	(get_window_list): length argument applies to %c and %a.

	* src/actions.c (cmd_tmpwm): stop waiting for the child if waitpid
	produced an error.

2005-04-17  Shawn  <sabetts@vcn.bc.ca>

	* src/actions.h: new prototype compat

	* src/actions.c (initialize_default_keybindings): move def* aliases to cmd_compat
	(cmd_compat): new function

	* src/messages.h (MESSAGE_RAISE_TRANSIENT_GROUP): new define
	(MESSAGE_RAISE_WINDOW_GROUP): likewise

	* src/group.h (groups_find_group_by_window): new prototype

	* src/group.c (groups_find_group_by_window): new function.

	* src/events.c (show_rudeness_raise_msg): new function
	(map_request): call show_rudeness_raise_msg
	(configure_request): likewise

2005-04-12  Shawn  <katia_dilkina@verizon.net>

	* contrib/rpws: Replace with Mike O'Connor's perl version.

2005-04-10  Shawn  <sabetts@vcn.bc.ca>

	* src/actions.c (cmdret_new): malloc enough for the cmdret structure.

2005-04-09  Shawn  <sabetts@monk.lamenet>

	* src/actions.c (init_user_commands): add KEY argument to meta
	command.
	(cmd_meta): optionally use the KEY passed in as an argument.
	(cmd_set): pass the string produced when no args are passid in to
	cmdret_new using "%s".
	(cmd_windows): return the string using "%s" in call to cmdret_new.
	(cmd_help): likewise.
	(cmd_gravity): likewise
	(cmd_getenv): likewise
	(cmd_fdump): likewise
	(cmd_groups): likewise
	(cmd_listhook): likewise
	(cmd_sfdump): likewise
	(cmd_sdump): likewise
	(cmd_describekey): likewise
	(cmd_prompt): likewise
	(cmd_getsel): likewise
	(cmd_unmanage): likewise
	(cmd_prev): likewise
	(cmd_prev_frame): likewise
	(cmd_next): likewise
	(cmd_next_frame): likewise
	(cmd_other): likewise
	(cmd_version): likewise
	(cmd_time): likewise
	(cmd_cnext): likewise
	(cmd_cprev): likewise
	(cmd_inext): likewise
	(cmd_iprev): likewise
	(cmd_cother): likewise
	(cmd_iother): likewise

2005-03-05    <sabetts@localhost>

	* src/ratpoison.h (check_child_procs): new prototype
	(chld_handler): likewise
	(set_sig_handler): likewise

	* src/main.c (check_child_procs): new function
	(chld_handler): call check_child_procs
	(free_screen): unselect all events on the root window.

	* src/actions.c: include signal.h
	(spawn): don't prefix the command with exec.
	(set_wingravity): print the setting as a string.
	(set_transgravity): likewise
	(set_maxsizegravity): likewise
	(set_bargravity): likewise
	(set_font): likewise
	(set_winfmt): likewise
	(set_fgcolor): likewise
	(set_bgcolor): likewise
	(set_framesels): likewise
	(cmd_tmpwm): ungrab the keys for all windows before spawning the
	new wm.
	(cmd_tmpwm): disable the sigchld handler then enabled it after the
	wm returns. call check_child_procs.


2005-02-26    <sabetts@localhost>

	* src/actions.c (parse_args): properly check if we've hit the arg
	limit.

2005-02-22  sabetts  <sabetts@apeguts>

	* src/main.c (read_startup_files): use xsprintf when generating
	path to ratpoisonrc.

	* src/input.c (get_more_input): Use HAVE_HISTORY to ifdef out
	history_reset.

	* src/actions.c (command): new variable, raw, which records
	whether to tell parse_args not to parse the last arg.
	(cmd_set): likewise

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

	* src/actions.c (parse_keydesc): return a cmdret error in the
	event of an error and take a point to an rp_key as an
	argument. Fill this argument with the parsed key.
	(parse_keydesc): Don't accept the keysym if it doesn't map to a
	keycode.
	(cmdret_new): renamed from cmdret_new_printf. All callers updated.
	(cmdret_new_printf): remove function.
	(arg_free): free the key member.

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

	* src/main.c (main): set the RATPOISON env. variable to the path
	to this executable.

2005-02-06  Shawn Betts  <sabetts@vcn.bc.ca>

	* src/actions.c (cmd_prompt): allow prompt to be run
	interactively.

2005-02-04  Shawn Betts  <sabetts@vcn.bc.ca>

	* configure.in: bump version to 1.4.0-CVS.

2005-02-04  Shawn Betts  <sabetts@vcn.bc.ca>

	* src/actions.c (set_winname): return the cmdret created.
	(cmd_unalias): likewise
	(cmd_nextscreen): likewise
	(cmd_prevscreen): likewise
	(cmd_gdelete): likewise

2005-01-30  Shawn Betts  <sabetts@vcn.bc.ca>

	* src/actions.c (cmd_escape): when the escape key doesn't have a
	modifier give the meta key a modifier.
	(cmd_undefinekey): call XSync after ungrabbing and grabbing all
	keys.

2005-01-22  Shawn Betts  <sabetts@vcn.bc.ca>

	* src/actions.h (argtype): add arg_RAW

	* src/actions.c (init_user_commands): make unmanage'd argument
	optional when called non-interactively.
	(init_user_commands): "title" accepts 1 argument.
	(init_user_commands): "echo" and "putsel" take a raw argument.
	(read_arg): parse arg_RAW
	(parse_args): take a raw argument. gobble whitespace when we've
	hit nargs and raw is false. callers updated.
	(command): don't gobble whitespace after reading the command. set
	nargs when the argtype is arg_RAW, too.
	(cmd_set): set nargs when the argtype is arg_RAW, too.

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

	* src/actions.c (init_user_commands): fix unmanage command.

2005-01-19  Shawn Betts  <sabetts@vcn.bc.ca>

	* contrib/genrpbindings: add python bindings.

2005-01-17  Shawn Betts  <sabetts@vcn.bc.ca>

	* src/frame.c (frame_read): remove space in "(frame " string.

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

	* src/actions.c (spawn): Prepend cmd with exec.

2004-01-15  Bernhard R. Link <brlink@debian.org>

	* actions.c (cmd_focusleft,cmd_focusright,cmd_focusup,cmd_focusdown): show
	currectframe if movement not possible.

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

	* src/frame.c (frame_read): correctly determine if the input
	starts with "(frame ".

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

	* src/actions.c (cmd_prev): return a cmdret*. same for error
	messages.
	(cmd_select): likewise.
	(command): use cmdret* to report when alias recursion has hit the
	limit.
	(cmd_resize): return a cmdret when num frames is < 2.
	(set_padding): return a cmdret*, not NULL.
	(cmd_nextscreen): likewise
	(cmd_prevscreen): likewise
	(cmd_addhook): likewise

	* src/main.c (main): Report extra unparsed arguments.

	* src/actions.c (init_user_commands): set the last argument of the
	following commands to arg_REST: addhook, chdir, remhook, source,
	tmpwm, and prompt.
	(command): check list_size of head when checking for too many
	arguments.
	(cmd_set): raise error if set command was passed too many
	arguments.

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

	* src/actions.c (init_user_commands): change select's argument to
	arg_REST.

	* configure.in: add AM_MAINTAINER_MODE

	* src/globals.h (rp_exec_newwm): new extern.

	* src/globals.c (rp_exec_newwm): new global.

	* src/actions.c (cmd_newwm): set rp_exec_newwm to the new wm.

	* src/events.c (listen_for_events): call XSync after
	delegate_event.
	(handle_signals): exec newwm if its not NULL. Report X11 errors
	(moved from listen_for_events).

2005-01-15  Ryan Yeske  <rcyeske@gmail.com>

	* src/editor.c (saved_command): Only define whe HAVE_HISTORY is
	defined.

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

	* src/actions.c (command): treat arg_SHELLCMD like arg_REST.
	(cmd_set): likewise

	* src/globals.h (RET_SUCCESS): set to 1
	(RET_FAILURE): set to 0

	* src/communications.c (receive_command_result)
	(receive_command_result): fix error deciding when to print to
	stderr.

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

	* src/actions.c (parse_args): remove erroneous pointer dereference
	of i when gobbling whitespace.
	(init_user_commands): set second argument to "alias" command to
	arg_REST.
	(init_user_commands): likewise for "set"
	(cmd_readkey): remove useless PRINT_DEBUG
	(cmd_set): pass an empty string to parse_args when the args[1] is
	NULL.
	(cmd_set): call the set function if the arg list size is 0.

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

	* src/main.c (init_defaults): turn off warp by default.

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

	* src/actions.c (ARG_STRING): new define
	(ARG): likewise
	(set_vars): change to a list_head.
	(add_set_var): new function
	(init_set_vars): likewise
	(user_commands): change to a list_head. Move command definitions
	to init_user_commands.
	(add_command): new function
	(init_user_commands): likewise
	(cmdret_new): likewise
	(cmdret_new_printf): likewise
	(cmdret_free): likewise
	(read_string): likewise
	(read_keymap): likewise
	(read_keydesc): likewise
	(read_command): likewise
	(read_shellcmd): likewise
	(read_frame): likewise
	(read_window): likewise
	(read_gravity): likewise
	(read_group): likewise
	(read_hook): likewise
	(read_variable): likewise
	(hook_completions): likewise
	(read_number): likewise
	(read_arg): likewise
	(parsed_input_to_args): likewise
	(fill_in_missing_args): likewise
	(parse_args): likewise
	(arg_array): likewise
	(arg_free): likewise
	(command): use parse_args, parsed_input_to_args,
	fill_in_missing_args to parse arguments and pass to command
	functions.
	(command): return cmdret* structure. prototype updated.
	(cmd_abort): second arg is an array of struct cmdarg*. Return
	cmdret*. Updated to use new parsed arguments.
	(cmd_addhook): likewise
	(cmd_alias): likewise
	(cmd_banish): likewise
	(cmd_bind): likewise
	(cmd_chdir): likewise
	(cmd_clrunmanaged): likewise
	(cmd_colon): likewise
	(cmd_curframe): likewise
	(cmd_delete): likewise
	(cmd_echo): likewise
	(cmd_escape): likewise
	(cmd_exec): likewise
	(cmd_fdump): likewise
	(cmd_focusdown): likewise
	(cmd_focuslast): likewise
	(cmd_focusleft): likewise
	(cmd_focusright): likewise
	(cmd_focusup): likewise
	(cmd_frestore): likewise
	(cmd_fselect): likewise
	(cmd_gdelete): likewise
	(cmd_getenv): likewise
	(cmd_gmerge): likewise
	(cmd_gmove): likewise
	(cmd_gnew): likewise
	(cmd_gnewbg): likewise
	(cmd_gnext): likewise
	(cmd_gprev): likewise
	(cmd_gravity): likewise
	(cmd_groups): likewise
	(cmd_gselect): likewise
	(cmd_h_split): likewise
	(cmd_help): likewise
	(cmd_info): likewise
	(cmd_kill): likewise
	(cmd_last): likewise
	(cmd_lastmsg): likewise
	(cmd_license): likewise
	(cmd_link): likewise
	(cmd_listhook): likewise
	(cmd_meta): likewise
	(cmd_msgwait): likewise
	(cmd_newwm): likewise
	(cmd_next): likewise
	(cmd_next_frame): likewise
	(cmd_nextscreen): likewise
	(cmd_number): likewise
	(cmd_only): likewise
	(cmd_other): likewise
	(cmd_prev): likewise
	(cmd_prev_frame): likewise
	(cmd_prevscreen): likewise
	(cmd_quit): likewise
	(cmd_redisplay): likewise
	(cmd_remhook): likewise
	(cmd_remove): likewise
	(cmd_rename): likewise
	(cmd_resize): likewise
	(cmd_restart): likewise
	(cmd_rudeness): likewise
	(cmd_select): likewise
	(cmd_setenv): likewise
	(cmd_shrink): likewise
	(cmd_source): likewise
	(cmd_startup_message): likewise
	(cmd_time): likewise
	(cmd_tmpwm): likewise
	(cmd_unalias): likewise
	(cmd_unbind): likewise
	(cmd_unimplemented): likewise
	(cmd_unmanage): likewise
	(cmd_unsetenv): likewise
	(cmd_v_split): likewise
	(cmd_verbexec): likewise
	(cmd_version): likewise
	(cmd_warp): likewise
	(cmd_windows): likewise
	(cmd_readkey): likewise
	(cmd_newkmap): likewise
	(cmd_delkmap): likewise
	(cmd_definekey): likewise
	(cmd_undefinekey): likewise
	(cmd_set): likewise
	(cmd_sselect): likewise
	(cmd_ratwarp): likewise
	(cmd_ratclick): likewise
	(cmd_ratrelwarp): likewise
	(cmd_rathold): likewise
	(cmd_cnext): likewise
	(cmd_cother): likewise
	(cmd_cprev): likewise
	(cmd_dedicate): likewise
	(cmd_describekey): likewise
	(cmd_inext): likewise
	(cmd_iother): likewise
	(cmd_iprev): likewise
	(cmd_prompt): likewise
	(cmd_sdump): likewise
	(cmd_sfdump): likewise
	(cmd_undo): likewise
	(cmd_putsel): likewise
	(cmd_getsel): likewise
	(set_resizeunit): arg is an array of struct cmdarg*. Return
	cmdret*. Updated to use new parsed arguments.
	(set_wingravity): likewise
	(set_transgravity): likewise
	(set_maxsizegravity): likewise
	(set_bargravity): likewise
	(set_font): likewise
	(set_padding): likewise
	(set_border): likewise
	(set_barborder): likewise
	(set_inputwidth): likewise
	(set_waitcursor): likewise
	(set_winfmt): likewise
	(set_winname): likewise
	(set_fgcolor): likewise
	(set_bgcolor): likewise
	(set_barpadding): likewise
	(set_winliststyle): likewise
	(set_framesels): likewise
	(set_maxundos): likewise

	* src/actions.h: include ratpoison.h
	(argtype): add arg_FRAME, arg_WINDOW, arg_COMMAND, arg_SHELLCMD,
	arg_KEYMAP, arg_KEY, arg_GRAVITY, arg_GROUP, arg_HOOK,
	arg_VARIABLE.
	(union arg_union): new union
	(struct cmdarg): new struct
	(struct argspec): likewise
	(struct cmdret): likewise
	(user_command): change func to reflect new command function
	args. add num_args, ni_required_args, i_required_args.
	(RP_CMD): new macro for prototyping command functions. all command
	function prototypes updated to use this macro.
	(init_user_commands): new prototype
	(cmdret_free): likewise

	* src/main.c (read_rc_file): handle cmdret* returned by command.
	(main): call init_user_commands

	* src/linkedlist.h (list_size): new prototype

	* src/linkedlist.c (list_size): new function

	* src/globals.h (RET_SUCCESS): new define
	(RET_FAILURE): new define

	* src/events.c (handle_key): handle the cmdret structure returned
	by command.
	(execute_remote_command): return cmdret*.
	(receive_command): mark the command return string as error or
	output before sending.

	* src/data.h (struct rp_action): change data element type to char*

	* src/communications.c (receive_command_result): print command
	output to stderr if marked as an error.

2005-01-04  Ryan Yeske  <rcyeske@gmail.com>

	* src/actions.c (cmd_rudeness): Print rudeness to bar when called
	interactively.

2005-01-03  Ryan Yeske  <rcyeske@gmail.com>

	* src/main.c (print_help): Update mailing list.

	* src/actions.c (cmd_license): Update mailing list and website.

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

	* contrib/genrpbindings: fix regex to match new actions.c format.

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

	* src/sbuf.c (sbuf_concat): call sbuf_nconcat. move bulk of body
	to sbuf_nconcat.
	(sbuf_nconcat): new function

	* src/globals.c (init_globals): new function

	* src/main.c (main): call init_globals.

	* src/globals.c: include unistd.h.
	(x_export_selection): new function
	(set_nselection): likewise
	(set_selection): call x_export_selection
	(get_cut_buffer): new function
	(get_primary_selection): likewise
	(get_selection): likewise

	* src/editor.c (editor_kill_word): add the deleted text to the X11
	selection
	(editor_backward_kill_word): likewise
	(editor_kill_line): likewise
	(backward_kill_line): new fuction
	(editor_backward_kill_line): add the deleted text to the X11
	selection. call backward_kill_line.
	(paste_cut_buffer): remove function
	(paste_primary_selection): likewise
	(editor_paste_selection): call get_selection to get the X11
	selection.
	(editor_complete): call backward_kill_line instead of
	editor_backward_kill_line.

	* src/ratpoison.h: Include string.h. Include X11/XAtom.h.

	* src/globals.c (selection): new global
	(set_selection): new function

	* src/events.c: include X11/Xmd.h
	(selection_request): new function
	(selection_clear): new function
	(delegate_event): call selection_request and selection_clear for
	SelectionRequest and SelectionClear events.

	* src/actions.c (user_commands): remove duplicate focusprev entry. Add putsel. Add getsel.
	(cmd_putsel): new function
	(cmd_getsel): new function

	* contrib/genrpbindings: add a missing paren to the elisp bindings.

2004-12-12  Ryan Yeske  <rcyeske@gmail.com>

	* MERCHANDISE: Add file.

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

	* src/actions.c (cmd_unmanage): fix message formatting
	(cmd_ratwarp): likewise
	(cmd_ratrelwarp): likewise
	(cmd_ratclick): likewise
	(cmd_rathold): likewise
	(cmd_unsetenv): likewise
	(set_barpadding): likewise
	(cmd_fselect): likewise
	(cmd_addhook): likewise
	(cmd_remhook): likewise
	(cmd_listhook): likewise
	(cmd_gdelete): likewise
	(cmd_readkey): likewise
	(cmd_newkmap): likewise
	(cmd_delkmap): likewise
	(cmd_describekey): likewise

	* src/messages.h (MESSAGE_NO_OTHER_WINDOW): remove padding spaces
	(MESSAGE_NO_OTHER_FRAME): likewise
	(MESSAGE_NO_MANAGED_WINDOWS): likewise
	(MESSAGE_UNKNOWN_COMMAND): likewise
	(MESSAGE_WINDOW_INFORMATION): likewise
	(MESSAGE_RAISE_TRANSIENT): likewise
	(MESSAGE_RAISE_WINDOW): likewise
	(MESSAGE_MAP_TRANSIENT): likewise
	(MESSAGE_MAP_WINDOW): likewise
	(MESSAGE_WELCOME): likewise
	(MESSAGE_FRAME_STRING): likewise

	* src/main.c (init_defaults): set bar_x_padding to 4

	* src/events.c (handle_signals): Remove padding space on all calls
	to message and marked_message_printf.

	* src/editor.c (editor_enter): Remove padding space on all calls
	to message and marked_message_printf.

	* src/actions.c: Remove padding space on all calls to message and
	marked_message_printf.

	* src/bar.c (get_mark_box): make the mark extend to the edge of
	the box regardless of the bar padding.

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

	* src/events.c (destroy_window): make sure the current screen is
	the windows screen before calling set_active_frame.
	(unmap_notify): likewise

	* src/actions.c (frestore): use strtok_r.

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

	* src/manage.c (unmanage): remove call to numset_release.

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

	* src/frame.c (frame_dump): use a hyphen instead of underscore for
	f->last_access.

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

	* src/actions.c (cmd_verbexec): rewritten to fix crash bug.

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

	* src/actions.c (cmd_rathold): change argument order. echo parse
	errors.

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

	* src/actions.c (cmd_sfdump): properly declare i at the top of the
	function.

	* src/frame.c (frame_dump): dump the frame as an sexpr instead of
	a list of numbers.
	(frame_read): read the new frame dump format
	(init_frame): new static function
	(frame_new): call init_frame
	(frame_read): likewise

	* src/actions.c (cmd_describekey): fix error messages.

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

	* src/actions.c (set_vars): add maxundos
	(push_frame_undo): new function
	(pop_frame_undo): likewise
	(initialize_default_keybindings): add binding for "undo"
	(initialize_default_keybindings): add def alias for maxundos
	(cmd_other): call set_active_window_force instead of
	set_active_window
	(cmd_v_split): push the frame set
	(cmd_h_split): likewise
	(cmd_only): likewise
	(cmd_remove): likewise
	(cmd_shrink): likewise
	(cmd_tmpwm): likewise
	(cmd_license): update copyright. Add build date and time.
	(cmd_fselect): simplify code that returns the frame selected.
	(fdump): new function
	(cmd_fdump): call fdump to dump the screen's frame set.
	(frestore): new function
	(cmd_frestore): call frestore to restore the screen's frame set.
	(cmd_sfdump): new function
	(cmd_sdump): likewise
	(set_maxundos): likewise
	(cmd_cnext): likewise
	(cmd_cprev): likewise
	(cmd_inext): likewise
	(cmd_iprev): likewise
	(cmd_cother): likewise
	(cmd_iother): likewise
	(cmd_undo): likewise
	(cmd_prompt): likewise
	(cmd_describekey): likewise
	(cmd_dedicate): likewise

	* src/main.c (init_defaults): init maxundos to 20
	(clean_up): free the undo history lists

	* src/window.h (set_active_window_body): new function
	(set_active_window_force): likewise

	* src/window.c (set_active_window): new function
	(set_active_window_force): likewise
	(set_active_window_body): renamed from set_active_window
	(set_active_window_body): Add code to handle dedicated frames.


	* src/screen.h (screen_dump): new prototype

	* src/screen.c (screen_dump): new function

	* src/linkedlist.h (list_last): new macro

	* src/group.h (group_last_window_by_class_complement): new prototype
	(group_last_window_by_class): likewise

	* src/group.c (group_last_window_by_class): new function
	(group_last_window_by_class_complement): likewise

	* src/globals.h (rp_frame_undos): new extern.
	(rp_num_frame_undos): likewise

	* src/globals.c (rp_frame_undos): new list.
	(rp_num_frame_undos): new global

	* src/frame.c (frame_new): init f->dedicated to 0.

	* src/data.h (struct rp_frame): add dedicated member.
	(struct rp_defaults): add maxundos member.
	(struct rp_frame_undo): new struct.

	* src/actions.c: new commands, cnext, cother, cprev,

	* src/window.c (print_window_information): add argument,
	group. print the window's number in the group. All callers
	updated.

	* src/actions.c (cmd_info): print the window's number in the
	current group.

	* src/window.c (unhide_transient_for): add a newline to debugging
	output.
	(hide_transient_for_between): likewise.

	* src/manage.c (get_wmname): typecast name when passing to
	xstrdup.

	* src/main.c (main): typecast command[i] when passing to
	send_command.

	* src/events.c (execute_remote_command): typecast req[1] when
	passing to command.
	(receive_command): typecast result when passing to
	XChangeProperty.

	* src/editor.c (editor_history_previous): Add newline to
	debugging output.
	(editor_history_next): likewise.
	(paste_primary_selection): typecast data when passing to editor_insert.

	* src/communications.c (receive_command_result): typecast result
	when passing to strlen.
	(send_command): typecast cmd when passing the XChangeProperty.

	* src/actions.c (user_commands): add focusprev
	(cmd_prev): clean up
	(cmd_next): likewise
	(cmd_prev_frame): call find_frame_prev instead of find_frame_next.
	(cmd_frestore): grab the frame's number first when processing the
	frames.

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

	* src/actions.c (user_commands): add rathold

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

	* src/actions.c (cmd_rathold): new function

2004-11-17  Bernhard R. Link <brlink@debian.org>

	* src/actions.c: (initialize_default_keybindings): Added
	default keybindings for focusleft,fcousup,focusright,focusdown.
	(cmd_resize): Added support for	multiple keybindings
	per action. Added arrow keys, escape and vi-like h,j,k,l
	to the keys used for resizing.

	* doc/ratpoison.1: Documented C-t arrow key
	* doc/ratpoison.texi: Documented C-t arrow key,
	fixed description of C-t f

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

	* contrib/rpws: use env to find out where bash is

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

	* contrib/genrpbindings: fix up path to ratpoison binary

	* src/actions.c (cmd_ratclick): new function
	(cmd_ratrelwarp): likewise
	(cmd_ratwarp): likewise
	(user_commands): new commands ratclick, ratrelwarp, ratwarp.

	* contrib/genrpbindings: add common lisp bindings

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

	* src/input.c (get_more_input): call history_reset

	* src/history.c (history_load): remove call to using_history.
	(history_save): likewise
	(history_add): likewise

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

	* src/split.c (blank_frame): use the frames screen, not the current screen.

	* src/group.c (group_last_window): add argument, the screen to find the
	window in. All callers updated.
	(group_prev_window): make sure the matched window is in the same
	screen as win.
	(group_next_window): likewise

	* src/window.c (find_window_other): add argument, the screen to
	find the window in. All callers updated.

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

	* contrib/rpws: remove the echo /tmp/boom line.

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

	* src/actions.c (set_padding): fix the padding order in xsprintf.

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

	* src/actions.c (cmd_set): check if var is NULL before checking strlen(var)

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

	* doc/ratpoison.texi (Frame Numbering): new topic

2004-07-24  Thien-Thi Nguyen  <ttn@glug.org>

	* autogen.sh: Handle "-f" option. Add usage comment.

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

	* src/actions.c (cmd_unsetenv): add an '=' to the string passed to
	putenv.
	(cmd_source): display an error message if no file is supplied.

	* src/main.c (print_version): update copyright date.

	* src/conf.h (DEFAULT_FONT): new define

	* src/main.c (init_defaults): use the DEFAULT_FONT define

	* src/actions.c: new command, sselect
	(cmd_sselect): new function. added prototype.
	(cmd_set): free 'var' at the appropriate places.
	(cmd_version): add the build date and time.
	(cmd_fselect): in interactive mode, return 'abort' when the user
	aborts, the frame number when they select one, or 'No such frame'
	when they selected a nonexistent one.
	(cmd_version): return the version string in non-interactive mode.
	(parse_wingravity): accept numbers for gravity.

	* src/events.c (property_notify): pass the root window to
	receive_command.
	(receive_command): take a root window as an argument and use it to
	listen for the command.

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

	* src/screen.h (is_a_root_window): new prototype

	* src/screen.c (is_a_root_window): new function

	* src/events.c (property_notify): check for ratpoison commands on
	every root window, not just the default root window.

	* src/communications.c (send_command): store the root window in a
	variable, root. and use it whenever the root window is needed.

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

	* configure.in: Warn when the history header or library is not
	found and compile without history support.

	* src/ratpoison.h: change ifdef to check for HAVE_HISTORY.

	* src/manage.c (get_state): change data to an unsigned char and
	cast data to a long* when it's used.

	* src/main.c (main): change ifdef to check for HAVE_HISTORY.
	(clean_up): likewise

	* src/history.c: change ifdef to check for HAVE_HISTORY.

	* src/events.c (receive_command): make prop_return an unsigned char.

	* src/editor.c (editor_history_previous): change ifdef to check for HAVE_HISTORY.
	(editor_history_next): likewise
	(editor_enter): likewise

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

	* contrib/ratpoison.el (ratpoison-command): use call-process.

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

	* src/main.c (init_defaults): set default for window list style to
	column.

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

	* src/number.c (numset_add_num): add debugging output to print the args.
	(numset_release): likewise
	(numset_request): add debugging output to print the requested number


	* src/manage.c (withdraw_window): Print an error when withdrawing
	a window who's number is -1.

	* src/main.c (clean_up): free the global frame numset.
	(free_screen): don't free the screen's numset, since it's a
	pointer to the global numset.

	* src/group.c (group_del_window): don't release the window number
	here. It's already been done in group_unmap_window.

	* src/events.c (configure_request): only change the stack mode for
	non withdrawn windows.

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

	* src/input.c (rp_mask_to_x11_mask): handle the shift modifier
	(x11_mask_to_rp_mask): likewise
	(keysym_to_keycode_mod): Make sure lower != keysym before adding
	the shift mask.
	(keysym_to_string): handle the shift modifier. use 's' for super
	instead of 'S'
	(cook_keycode): keep the shift modifier if XLookupString didn't
	gobble it.

	* src/data.h (RP_SHIFT_MASK): new define

	* src/actions.c (parse_keydesc): parse the shift modifier change
	super to 's' from 'S'.

	* src/window.c (format_window_name): add %f format option

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

	* src/input.c (grab_key): use keysym_to_keycode_mod to get the
	keycode and modifier for the keysym.
	(keysym_to_keycode_mod): new function

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

	* src/data.h (struct rp_defaults): new members, font_string,
	fgcolor_string, bgcolor_string.

	* src/actions.c (set_font): return defaults.font_string when data is NULL
	(set_fgcolor): likewise for fgcolor_string
	(set_bgcolor): likewise for bgcolor_string

	* src/manage.c (ungrab_top_level_keys): properly grab capital letters.

	* src/main.c (init_defaults): init fgcolor_string, bgcolor_string, and font_string

	* src/input.c (grab_key): change keysym type to KeySym. convert
	keysym to keycode. All callers updated.

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

	* src/actions.c (cmd_set): if non-interactive and no arguments are
	specified, then output the current value of all variables.

	* src/messages.h (MESSAGE_PROMPT_SELECT_VAR): new define
	(MESSAGE_PROMPT_VAR_VALUE): likewise

	* src/actions.h (cmd_set): new prototype

	* src/actions.c (user_commands): remove all def* commands. Add 'set' command.
	rename all cmd_def* commands to set_*. Add prototypes for set_* commands.
	(struct set_var): new struct
	(set_vars): new static global
	(cmd_set): new function
	(var_completions): new function
	(initialize_default_keybindings): add aliases for def* commands

	* src/events.c (configure_request): only display a raise request
	if the window isn't already focused.

	* src/manage.h (ungrab_keys_all_wins): new prototype
	(grab_keys_all_wins): likewise

	* src/manage.c (grab_top_level_keys): renamed from
	grab_prefix_key (all callers updated). Grab all keys in the top level keymap.
	(ungrab_top_level_keys): renamed from ungrab_prefix_key (all callers updated). ungrab
	all keys in the top level keymap.
	(ungrab_keys_all_wins): new function
	(grab_keys_all_wins): likewise

	* src/globals.c: (rp_key_hook): rename from
	rp_prefix_hook. Dependant code updated.
	(set_rp_window_focus): change 'prefix' hook to 'key' hook.

	* src/events.c (handle_key): handle a top level key press.
	(handle_key): new arguments ks, and mod.
	(key_press): pass the keysym and modifier to handle_key

	* src/conf.h (TOP_KEYMAP): new define

	* src/actions.c (cmd_v_split, cmd_h_split): swap names.
	(user_commands): bind split to cmd_v_split.
	(initialize_default_keybindings): initialize the top level keymap
	(cmd_definekey): update the keys grabbed when changing a key on
	the top level keymap.
	(cmd_escape): update the escape key in the top level map.
	(cmd_delkmap): don't allow the deletion of the top level keymap.

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

	* src/main.c (init_defaults): init frame_selectors.

	* src/data.h (struct rp_defaults): new field, frame_selectors.

	* src/actions.h (cmd_defframesels): new prototype

	* src/actions.c (user_commands): new command defframesels
	(frame_selector): new function
	(frame_selector_match): likewise
	(cmd_defframesels): likewise
	(cmd_fselect): use default.frame_selectors to select a frame.

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

	* configure.in: fix check for Xinerama.h

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

	* src/screen.c (screen_free_nums): new function. prototype added
	(init_screens): init rp_frame_numset
	(init_screen): set screen's frames_numset to rp_frame_numset

	* src/globals.h: new global prototype, rp_frame_numset

	* src/globals.c: new global, rp_frame_numset

	* src/split.c (find_last_frame): find the last from of all the
	screens. prototype updated. Callers updated.
	(find_frame_number): search all screens. prototype
	updated. callers updated.

	* src/actions.c (cmd_fselect): select from frames in all screens.

	* src/window.c (give_window_focus): save the mouse position before
	checking if win is NULL.
	(give_window_focus): set rp_current_screen to xine_screen_num of
	the window's screen.
	(set_active_window): when using xinerama get the frame from the
	current screen.

	* src/split.c (set_frames_window): update the window's scr
	attribute to point to the frame's screen.
	(find_window_for_frame): when xinerama is being used search all
	windows.
	(set_active_frame): update rp_current_screen to point to the
	frame's screen.

	* src/screen.h (init_screens): new prototype
	(is_rp_window_for_screen): likewise

	* src/screen.c: include string.h and X11/cursorfont.h
	(init_screens): new function
	(is_rp_window_for_screen): new function.
	(init_screen): fill in xine_screen_num when using xinerama.

	* src/ratpoison.h: include xinerama.h

	* src/manage.c (current_screen): use xine_screen_num to find the
	current screen.
	(scanwins): use is_rp_window_for_screen to skip over ratpoison windows.
	(scanwins): when using xinerama only manage windows inside the viewable area.

	* src/main.c (main): call init_xinerama and init_screens. Move
	screen initing code to these functions.
	(init_rat_cursor): move to screen.c
	(init_screen): likewise
	(find_screen): likewise
	(clean_up): call free_xinerama


	* src/group.c (group_last_window): only check windows in the
	current screen, unless xinerama is being used in which case all
	windows are accessible.
	(group_next_window): likewise
	(group_prev_window): likewise

	* src/globals.h: new globals rp_have_xinerama, xine_screen_num.

	* src/events.c (new_window): when using xinerama, the new window's
	screen is the current screen.
	(key_press): when using xinerama, use the current screen.

	* src/data.h (struct rp_screen): remove root_attr and add left,
	top, width, height. All dependant code updated. Add xine_screen_num.

	* src/actions.c (cmd_remove): show the frame indicator in the new
	current frame after removing the frame.

	* src/Makefile.am (ratpoison_SOURCES): add xinerama.c and xinerama.h

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

	* src/split.c (hide_frame_indicator): unmap all 'current frame'
	indicator windows.
	(show_frame_indicator): hide the 'current frame' indicator before
	showing it.

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

	* src/actions.c (cmd_tmpwm): add an XSync() call

2004-01-25  Ryan Yeske  <rcyeske@vcn.bc.ca>

	* src/actions.c (sync_wins): Change list_for_each_entry to
	list_for_each_entry_safe.
	(cmd_tmpwm): Unhide and maximize each mapped window before
	spawning a new wm.

2003-11-29  Ryan Yeske  <rcyeske@vcn.bc.ca>

	* src/communications.c (receive_command_result): Rename from
	recieve_command_result.  From paxed.

	* src/events.c (handle_signals): s/recieve/receive.

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

	* src/main.c (ratpoison_longopts): add "file"
	(ratpoison_opts): add f: option
	(print_help): print help for --file option
	(read_startup_files): take an alternative rc file as an argument
	and use it if it is non-NULL.
	(main): parse the --file option. pass alt_rcfile to
	read_startup_files.

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

	* contrib/Makefile.am (pkgdata_DATA): add rpshowall.sh
	(EXTRA_DIST): likewise

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

	* contrib/rpshowall.sh: store ratpoison binary location in
	RATPOISON env var.

	* src/ratpoison.h (FD_CLOEXEC): new define
	(set_close_on_exec): new prototype

	* src/main.c (ratpoison_longopts): add "interactive" option.
	(ratpoison_opts): likewise
	(print_help): print a help line for interactive option.
	(set_close_on_exec): new function
	(read_startup_files): call set_close_on_exec on file pointer
	(main): parse interactive command line option and pass it to
	send_command.

	* src/events.c (execute_remote_command): pass the interactive bit
	to command.

	* src/communications.c (send_command): send an interactive bit at
	the beginning of the message. Take an interactive argument. All
	callers updated. Prototype updated.

	* src/actions.c (cmd_source): call set_close_on_exec on file pointer.

2003-11-16  Ryan Yeske  <rcyeske@vcn.bc.ca>

	* contrib/rpshowall.sh: Added file.  From Florian Cramer
	<cantsin@zedat.fu-berlin.de>

2003-11-02  Thien-Thi Nguyen  <ttn@glug.org>

	* AUTHORS: Add self.

	* configure.in: Add "--disable-history" handling.
	Conditionalize libhistory checks accordingly.

	* README: Mention "--disable history".

	* src/history.c: Surround most of the code with
	"#ifdef HAVE_READLINE_HISTORY_H".

	* src/ratpoison.h: Only #include history.h when
	"#ifdef HAVE_READLINE_HISTORY_H".

	* src/main.c (main, clean_up): Only load and save history,
	respectively, when "#ifdef HAVE_READLINE_HISTORY_H".

	* src/editor.c (editor_history_previous, editor_history_next):
	Return EDIT_NO_OP when not "#ifdef HAVE_READLINE_HISTORY_H".
	(editor_enter): Do not do line expansion or history add
	when not "#ifdef HAVE_READLINE_HISTORY_H".

	* doc/ratpoison.texi: Mention that history cycling and
	processing is not available when ratpoison is configured
	with the "--disable-history" option.

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

	* src/input.c (cook_keycode): null terminate the string.

2003-10-24  Ryan Yeske  <rcyeske@vcn.bc.ca>

	* contrib/ratpoison.el: Added requires.

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

	* src/globals.c (rp_hook_db): add hooks quit and restart
	(rp_quit_hook): new global
	(rp_restart_hook): likewise

	* src/events.c (handle_signals): call the restart and quit hooks

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

	* contrib/clickframe.pl: put the patch at the end of the file and
	make it runnable through patch.

	* contrib/Makefile.am (EXTRA_DIST): add clickframe.pl
	(pkgdata_DATA): likewise

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

	* src/bar.c (prepare_bar): move and resize the window before mapping it.

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

	* src/actions.c (initialize_default_keybindings): use ROOT_KEYMAP
	in the bind and unbind aliases.

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

	* src/main.c (show_welcome_message): search the root keymap for
	the help binding.
	(clean_up): call free_keymaps and not free_keybindings.

	* src/events.c (handle_key): call cmd_readkey to hand actually
	reading a key from the keyboard.

	* src/data.h (typedef rp_keymap): new typedef
	(struct rp_keymap): new struct

	* src/conf.h (ROOT_KEYMAP): new define

	* src/actions.h (cmd_readkey): new prototype
	(cmd_newkmap): likewise
	(cmd_delkmap): likewise
	(cmd_definekey): likewise
	(find_keymap): likewise
	(keymap_free): likewise
	(free_keymaps): likewise

	* src/actions.c (rp_keymaps): new global.  remove globals
	key_actions, key_actions_last, and key_actions_table_size.
	(user_commands): remove bind and unbind. New commands readkey,
	newkmap, delkmap, and definekey.
	(find_keybinding_by_action): take a rp_keymap argument and operate
	on it. All callers updated.
	(find_keybinding): likewise
	(find_command_by_keydesc): likewise
	(resolve_command_from_keydesc): likewise
	(add_keybinding): likewise
	(remove_keybinding): likewise
	(cmd_definekey): new function
	(cmd_newkmap): likewise
	(cmd_delkmap): likewise
	(keymap_new): likewise
	(keymap_free): likewise
	(find_keymap): likewise
	(free_keymaps): likewise
	(cmd_bind): remove function. Prototype removed.
	(cmd_unbind): likewise
	(initialize_default_keybindings): add aliases for unbind and bind.
	(ungrab_rat): moved from events.c
	(grab_rat): likewise


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

	* src/input.c (get_more_input): use XGrabKeyboard and XUngrabKeyboard
	for changing focus to read key presses.

	* src/events.c (handle_key): use XGrabKeyboard and XUngrabKeyboard
	for changing focus to read key presses.

	* src/actions.c (cmd_resize): use XGrabKeyboard and
	XUngrabKeyboard for changing focus to read key presses.
	(cmd_license): likewise
	(cmd_help): likewise
	(cmd_fselect): likewise

2003-08-29  Shawn Betts  <sabetts@vcn.bc.ca>

	* src/window.c (give_window_focus): use set_rp_window_focus.

	* src/split.c (set_active_frame): use set_window_focus.
	(blank_frame): likewise

	* src/main.c (main): use set_window_focus.

	* src/input.c (get_more_input): use set_window_focus

	* src/globals.h (set_window_focus): new prototype
	(set_rp_window_focus): likewise

	* src/events.c (handle_key): use set_window_focus.

	* src/actions.c (cmd_resize): use set_window_focus.
	(cmd_license): likewise
	(cmd_help): likewise
	(cmd_tmpwm): likewise
	(cmd_fselect): likewise

	* src/globals.c (set_rp_window_focus): new function
	(set_window_focus): likewise

2003-08-24  Shawn Betts  <sabetts@sfu.ca>

	* src/window.c (goto_window): don't do anything if the window is
	already the current window.
	(set_active_window): don't abort if last_win and win are the same.

2003-08-22  Shawn Betts  <sabetts@sfu.ca>

	* src/window.c (set_active_window): don't do anything if the
	window is already the focused window.

	* src/split.c (remove_all_splits): only hide the windows in the
	current screen.

	* src/group.h (group_delete_group): new prototype

	* src/group.c (group_last_window): find the last window in the
	current screen.
	(group_next_window): find next window in current screen.
	(group_prev_window): find previous window in current screen.

	* src/manage.c (force_maximize): call XSync() after first resize.

	* src/globals.h (GROUP_DELETE_GROUP_OK): new define
	(GROUP_DELETE_GROUP_NONEMPTY): likewise

	* src/actions.h (cmd_gdelete): new prototype

	* src/actions.c (user_commands): new command gdelete
	(cmd_gdelete): new command

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

	* src/editor.c (editor_enter): return EDIT_ABORT if there was an
	error with the history retrieval.

	* src/bar.c (get_mark_box): take the bar padding into account when
	calculate the top of the highlight bar.
	(prepare_bar): just use height for the height of the window.
	(marked_message): add the padding to the height of the window.

	* src/window.c (give_window_focus): only save the pointer position
	when win and last_win aren't the same window.

	* src/actions.h (cmd_listhook): new prototype

	* src/actions.c (use_commands): new command listhook
	(cmd_remhook): fix error messages
	(hook_completions): new function
	(cmd_listhook): likewise

2003-08-02  Shawn Betts  <sabetts@sfu.ca>

	* src/actions.c (cmd_number): rename the window's group number
	instead of it's internal number.

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

	* src/hook.c: include string.h

	* src/window.c (set_active_window): run the switch window hook.

	* src/split.c (set_active_frame): run the switch frame hook.

	* src/ratpoison.h: include hook.h

	* src/group.h (set_current_group): new prototype

	* src/group.c (set_current_group): new function

	* src/globals.h (rp_prefix_hook): new extern
	(rp_switch_win_hook): likewise
	(rp_switch_frame_hook): likewise
	(rp_switch_group_hook): likewise
	(rp_hook_db): likewise

	* src/globals.c (rp_prefix_hook): new hook
	(rp_switch_win_hook): likewise
	(rp_switch_frame_hook): likewise
	(rp_switch_group_hook): likewise
	(rp_hook_db): new global

	* src/events.c (handle_key): call the prefix hook.

	* src/data.h (struct rp_hook_db_entry): new struct

	* src/actions.h (cmd_addhook): new prototype
	(cmd_remhook): likewise

	* src/actions.c (user_commands): add commands addhook and remhook.
	(cmd_windows): show the window bar no matter what if the bar
	timeout is > 0.
	(cmd_gnext): call set_current_group
	(cmd_gprev): likewise
	(cmd_gnew): likewise
	(cmd_gselect): likewise
	(cmd_addhook): new function
	(cmd_remhook): likewise

	* src/Makefile.am (ratpoison_SOURCES): add hook.c and hook.h

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

	* src/editor.c (editor_enter): return EDIT_ABORT when a history
	expansion fails.

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

	* contrib/rpws: only set RATPOISON if it's not already set.

	* src/actions.c (cmd_gmove): prompt the user if no group is passed
	as an argument.

	* contrib/rpws: call /bin/bash
	(rp_call): remove extraneous 'function' keyword in function declaration.
	(ws_init_ws): likewise
	(ws_init): likewise
	(ws_save): likewise
	(ws_restore): likewise
	(ws_bindings): likewise

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

	* contrib/rpws (rp_call): Don't print debug information.

	* src/actions.c (cmd_resize): fix error message text
	(cmd_resize): likewise
	(cmd_defresizeunit): likewise
	(cmd_defresizeunit): likewise
	(cmd_chdir): likewise
	(cmd_frestore): likewise
	(cmd_frestore): likewise
	(cmd_defwinliststyle): likewise
	(cmd_defwinliststyle): likewise
	(cmd_gmove): likewise
	(cmd_gmove): likewise
	(cmd_gmerge): likewise

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

	* src/actions.c (cmd_groups): print a * beside the current
	group. if non-interactively called, return the string.
	(sync_wins): rewrite.
	(cmd_groups): always print a column in non-interactive mode.

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

	* contrib/Makefile.am (bin_SCRIPTS): add rpws

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

	* src/window.c (set_active_window): remove duplicate call to
	unhide_window, it is made in give_window_focus. Call
	give_window_focus before calling hide_others.

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

	* src/group.c (groups_merge): don't merge a group with itself.

	* src/bar.c (draw_mark): abort if mark_end is the beginning of the
	line or the start and end of the mark is the same.

	* src/actions.c (group_completions): use a group's number if it
	has no name.

2003-05-31  Shawn Betts  <sabetts@sfu.ca>

	* configure.in: check for usleep

2003-05-28  Shawn Betts  <sabetts@sfu.ca>

	* src/completions.c (completions_complete): if direction is
	COMPLETION_PREVIOUS, then set last_match to it's previous entry.

	* src/globals.h (COMPLETION_NEXT): new define
	(COMPLETION_PREVIOUS): likewise

	* src/editor.c (editor_complete): remove prototype
	(editor_complete_prev): new prototype
	(editor_complete_next): likewise
	(editor_insert): make it a static function. update prototype
	(edit_bindings): add editor_complete_prev. replace editor_complete
	with editor_complete_next.
	(editor_complete): call completions_complete
	(editor_complete_next): new function
	(editor_complete_prev): likewise

	* src/completions.h (completions_next_completion): remove prototype
	(completions_update): likewise
	(completions_assign): likewise
	(completions_complete): new prototype

	* src/completions.c (completions_assign): make it a static
	function
	(completions_update): likewise
	(completions_prev_match): new function
	(completions_next_match): likewise
	(completions_complete): renamed from
	completions_next_completion. call completions_next_match and
	completions_prev_match.

2003-05-27  Shawn Betts  <sabetts@sfu.ca>

	* src/completions.c (completions_next_completion): check
	c->last_match as a match to partial on a virgin completion.

	* src/group.c (free_groups): new function

	* src/group.h (free_groups): new prototype

	* src/main.c (clean_up): call free_groups

	* src/actions.c (cmd_fdump): free the string returned by frame_dump.

	* src/completions.c (completions_update): free new_list.

	* src/editor.c (input_line_free): free the completions structure
	in line.

	* configure.in: add a check for libhistory.

	* src/editor.c (saved_command): new local global
	(edit_binding): new typedef
	(edit_binding): new struct
	(edit_bindings): new local global
	(input_line_new): new function
	(input_line_free): likewise
	(execute_edit_action): likewise
	(editor_forward_char): likewise
	(editor_backward_char): likewise
	(editor_forward_word): likewise
	(editor_backward_word): likewise
	(editor_beginning_of_line): likewise
	(editor_end_of_line): likewise
	(editor_delete_char): likewise
	(editor_backward_delete_char): likewise
	(editor_kill_word): likewise
	(editor_backward_kill_word): likewise
	(editor_kill_line): likewise
	(editor_backward_kill_line): likewise
	(editor_history_previous): likewise
	(editor_history_next): likewise
	(editor_abort): likewise
	(editor_no_action): likewise
	(editor_insert): likewise
	(editor_enter): likewise
	(paste_cut_buffer): likewise
	(paste_primary_selection): likewise
	(editor_paste_selection): likewise
	(editor_complete): likewise
	(editor_forward_char): new prototype
	(editor_backward_char): likewise
	(editor_forward_word): likewise
	(editor_backward_word): likewise
	(editor_beginning_of_line): likewise
	(editor_end_of_line): likewise
	(editor_delete_char): likewise
	(editor_backward_delete_char): likewise
	(editor_kill_word): likewise
	(editor_backward_kill_word): likewise
	(editor_kill_line): likewise
	(editor_paste_selection): likewise
	(editor_abort): likewise
	(editor_no_action): likewise
	(editor_enter): likewise
	(editor_history_previous): likewise
	(editor_history_next): likewise
	(editor_complete): likewise
	(editor_backward_kill_line): likewise

	* src/sbuf.h (sbuf): add node field.

	* src/main.c (xrealloc): don't print debugger output
	(init_defaults): init history_size
	(main): initialize rp_selection
	(main): load history
	(clean_up): save history

	* src/linkedlist.h (list_first): new macro

	* src/input.h (free_history): remove prototype
	(ring_bell): new function

	* src/input.c: include unistd.h
	(input_history): remove
	(input_num_history_entries): likewise
	(update_input_window): remove prompt, input, and input_len
	arguments. add line argument.
	(update_input_window): use line argument.
	(ring_bell): new function
	(get_input): take completion_fn argument. prototype and callers
	updated.
	(free_history): remove function
	(get_more_input): take completion_fn argument. prototype and
	callers updated. use line structure and its functionality.

	* src/globals.h (MAX_FONT_WIDTH): new define
	(rp_selection): new extern

	* src/globals.c (rp_selection): new global

	* src/completions.h (completions_new): new prototype
	(completions_free): likewise
	(completions_assign): likewise
	(completions_update): likewise
	(completions_next_completion): likewise


	* src/completions.c (completions_new): new function
	(completions_free): likewise
	(completions_assign): likewise
	(completions_update): likewise
	(completions_next_completion): likewise

	* src/Makefile.am (ratpoison_SOURCES): add editor.c editor.h
	history.h and history.c

	* src/data.h (rp_completions): new typedef
	(rp_input_line): likewise
	(completion_fn): likewise
	(rp_defaults): new field, history_size
	(rp_completions): new struct
	(rp_input_line): new struct

	* src/conf.h (MAX_HISTORY_SIZE): new define
	(HISTORY_FILE): likewise
	(VISUAL_BELL): likewise
	(MODIFIER_PREFIX): set to RP_CONTROL_MASK
	(INPUT_ABORT_MODIFIER): likewise
	(INPUT_PREV_HISTORY_MODIFIER): likewise
	(INPUT_NEXT_HISTORY_MODIFIER): likewise
	(RESIZE_VGROW_MODIFIER): likewise
	(RESIZE_VSHRINK_MODIFIER): likewise
	(RESIZE_HGROW_MODIFIER): likewise
	(RESIZE_HSHRINK_MODIFIER): likewise

	* src/actions.c (trivial_completions): new function
	(window_completions): likewise
	(colon_completions): likewise
	(exec_completions): likewise
	(cmd_select): pass window_completions to get_input
	(cmd_rename): pass trivial_completions to get_input
	(cmd_colon): pass colon_completions to get_input and
	get_more_input
	(cmd_exec): pass exec_completions to get_input
	(cmd_newwm): pass trivial_completions to get_input
	(cmd_resize): convert the keysym modifier to something ratpoison
	understands.

2003-05-25  Shawn Betts  <sabetts@sfu.ca>

	* src/Makefile.am (ratpoison_SOURCES): add completions.c and completions.h

	* src/actions.c (cmd_gmerge): show a message if the group
	specified by the user could not be found.
	(cmd_gselect): if the user didn't type anything then return.

	* src/window.c: do not include ctype.h

	* src/ratpoison.h (str_comp): new prototype

	* src/messages.h (MESSAGE_PROMPT_SWITCH_TO_GROUP): new define

	* src/main.c: include ctype.h
	(str_comp): moved from window.c

	* src/group.h (groups_find_group_by_name): new prototype.
	(groups_find_group_by_number): likewise.
	(groups_merge): likewise
	(group_move_window): likewise

	* src/group.c: include string.h
	(group_new): new argument, name. All callers updated. prototype
	updated.
	(init_groups): create the first group with DEFAULT_GROUP_NAME as
	its name.
	(group_new): new argument, name. All callers updated. Prototype
	updated.
	(group_free): free the group's name.
	(group_add_new_group): new argument, name. All callers
	updated. Prototype updated.
	(groups_find_group_by_name): new function
	(groups_find_group_by_number): likewise
	(group_move_window): likewise
	(groups_merge): likewise

	* src/conf.h (DEFAULT_GROUP_NAME): new define

	* src/actions.h (cmd_gselect): new prototype
	(cmd_groups): likewise
	(cmd_gmove): likewise
	(cmd_gmerge): likewise
	(cmd_gnewbg): likewise

	* src/actions.c (user_commands): new commands gselect, groups,
	gmove, gmerge, gnewbg.
	(cmd_gnewbg): new function
	(find_group): likewise
	(cmd_gselect): likewise
	(cmd_groups): likewise
	(cmd_gmove): likewise
	(cmd_gmerge): likewise

	* src/bar.c (reset_alarm): new function
	(show_bar): call reset_alarm()
	(count_lines): make function static. clean up code.
	(max_line_length): likewise
	(pos_in_line): likewise
	(line_beginning): likewise
	(draw_string): new static function
	(correct_mark): likewise
	(prepare_bar): likewise
	(get_mark_box): likewise
	(draw_inverse_box): likewise
	(draw_mark): likewise
	(update_last_message): likewise
	(marked_message): Move most of the code to seperate function
	calls. Call reset_alarm(), prepare_bar(), draw_string(),
	correct_mark(), draw_mark(), and update_last_message().

	* src/actions.c (cmd_select): fix crash bug.

	* src/window.c (get_window_list): mark_end is the length of the
	string. Don't do a special case if the window list is being
	displayed as a column.

	* src/input.c (read_key): Do not wait for the key release
	event. Remove gobble_rel argument. Callers updated.

2003-05-24  Shawn Betts  <sabetts@sfu.ca>

	* src/group.h (group_resort_window): new prototype

	* src/group.c (group_find_window_by_number): return
	rp_window_elem*. Dependant code updated.
	(group_insert_window): new function
	(group_in_list): likewise
	(group_resort_window): likewise
	(group_map_window): insert the window and sort the list.

	* src/actions.c (cmd_number): Change the group number of the
	window.
	(cmd_resize): print an error message if the command was called
	interactively with <2 arguments.

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

	* src/actions.c (cmd_resize): fail if data == NULL when called
	non-interactively.

2003-05-20  Shawn Betts  <sabetts@sfu.ca>

	* src/linkedlist.h: Move all C function to linkedlist.c

2003-05-19  Shawn Betts  <sabetts@sfu.ca>

	* src/window.c (find_window): add debugging output describing
	which window list the window was found in.

	* src/group.c (group_new): assign the group's number the number
	passed as an argument.

	* src/events.c (destroy_window): withdraw iconified and normal
	windows before unmanaging them.
	(handle_signals): delete the node from the list before freeing it.

	* src/bar.h (message): remove define.
	(marked_wrapped_message): remove prototype
	(message): new prototype

	* src/bar.c (message): new function
	(marked_wrapped_message): renamed to marked_message. remove
	marked_message.

2003-05-18  Shawn Betts  <sabetts@sfu.ca>

	* src/bar.c (marked_wrapped_message): Free the GC's created with
	XCreateGC.

2003-05-17  Shawn Betts  <sabetts@sfu.ca>

	* configure.in: version bump to 1.3.0-cvs

	* src/main.c (chld_handler): Variable declaration placed in proper
	location.

	* src/actions.c (spawn): always put the DISPLAY string in the
	environment.

2003-05-16  Shawn Betts  <sabetts@sfu.ca>

	* src/window.c (add_to_window_list): add the window to the current
	group.
	(find_window_name): search the current group for a matching
	window.
	(find_window_other): likewise.
	(format_window_name): take a rp_window_elem as an argument, not an
	rp_window. Print the group window's number, not the window's
	internal number.
	(get_window_list): loop through the current group.

	* src/split.c (find_window_for_frame): search the current group
	for a window to fit in the frame.

	* src/ratpoison.h: include globals.h and group.h

	* src/manage.c (unmanage): remove the window from any groups it
	was in.
	(map_window): map the window in any groups it is in.
	(withdraw_window): unmap the window in any groups it is in.

	* src/main.c: Move all globals to globals.h
	(main): initialize the group functions.

	* src/data.h: Move all defines and extern globals to globals.h
	(struct rp_window_elem): new struct
	(struct rp_group): likewise

	* src/actions.h (cmd_gnext): new prototype
	(cmd_gprev): likewise
	(cmd_gnew): likewise

	* src/actions.c (user_commands): new commands gnext, gprev, and gnew
	(cmd_prev): fix to work with new group code.
	(cmd_next): likewise
	(cmd_gnext): new function
	(cmd_gprev): likewise
	(cmd_gnew): likewise

	* src/Makefile.am (ratpoison_SOURCES): add files globals.h,
	globals.c, group.h and group.c

2003-05-15  Shawn Betts  <sabetts@sfu.ca>

	* src/data.h (struct rp_frame): renamed from rp_window_frame. All
	dependant code updated.

	* src/main.c: remove child_info global. Add rp_children global.
	(chld_handler): update the terminated and status fields of any
	terminated children.

	* src/events.c (handle_signals): loop through each child process
	and remove them from the list. Print a message for any child that
	doesn't return a 0 status.

	* src/data.h (rp_child_info): new fields, terminated and node.
	remove child_info global. Add rp_children global.

	* src/actions.c (spawn): Add the command to the list of children.

2003-05-14  Shawn Betts  <sabetts@sfu.ca>

	* src/data.h (struct rp_screen): rename from
	screen_info. Dependant code updated.

2003-05-09  Shawn Betts  <sabetts@sfu.ca>

	* src/manage.h (clear_unmanaged_list): new prototype
	(list_unmanaged_windows): likewise
	(add_unmanaged_window): likewise

	* src/manage.c (unmanaged_window_list): no longer a const.
	(num_unmanaged_windows): new static global
	(clear_unmanaged_list): new function
	(list_unmanaged_windows): likewise
	(add_unmanaged_window): likewise
	(unmanaged_window): use num_unmanaged_windows to tell how many
	elements are in the unmanaged list.

	* src/actions.h (cmd_unmanage): new prototype
	(cmd_clrunmanaged): likewise

	* src/actions.c (user_commands): new commands unmanage,
	clrunmanaged.
	(cmd_unmanage): new function
	(cmd_clrunmanaged): likewise

	* src/split.c (split_frame): call update_bar() instead of
	update_window_names().
	(set_active_frame): likewise
	(blank_frame): likewise

	* src/bar.h (update_bar): new prototype.

	* src/bar.c (BAR_IS_HIDDEN): new define.
	(update_bar): new function.

	* src/actions.c (cmd_frestore): call update_bar() instead of
	update_window_names().

	* src/split.c (set_active_frame): update the window list after
	switching frames.
	(blank_frame): update the window list after blanking the screen.

	* src/actions.c (cmd_frestore): update the window list after
	restoring the frames.

	* src/split.c (split_frame): update the window list after the
	split.

2003-04-13  Shawn Betts  <sabetts@sfu.ca>

	* src/main.c (main): if the screen was specified on the
	command-line, send the command to the correct screen.

	* src/communications.c (send_command): new argument,
	screen_num. Get the root window for the specified
	screen. prototype updated.

	* src/main.c (init_screen): print the display string for
	debugging.
	(ratpoison_opts): fix -c option by adding a : after it.

	* src/manage.c (current_screen): search for the current screen
	using rp_current_screen.

	* src/main.c (main): add switch case for the display command line
	option.
	(print_help): add --display option. Add text to demonstrate
	--display and --command take an argument.
	(ratpoison_longopts): add display.
	(ratpoison_longopts): add screen.
	(ratpoison_opts): add 'd'
	(ratpoison_opts): add 's'
	(main): parse the screen argument and process it.
	(print_help): add --screen

	* src/manage.c (get_wmname): add debugging output to print
	returned elements from X11 call.

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

	* src/manage.c (get_wmname): add a debug line to print the
	property returned.
	(get_wmname): add newline in debug print out.
	(get_wmname): fail if n is 0.

	* src/window.c (window_name): use WIN_NAME_* defines for possible
	defaults.win_name values.
	(window_name): remove case WIN_NAME_TITLE and glob it with the
	default switch.

	* src/main.c (init_defaults): use WIN_NAME_* defines for
	possible defaults.win_name values.

	* src/actions.c (cmd_defwinname): use WIN_NAME_* defines for
	possible defaults.win_name values.
	(cmd_defwinname): likewise

	* src/data.h (WIN_NAME_TITLE): new define
	(WIN_NAME_RES_CLASS): new define
	(WIN_NAME_RES_NAME): new define

	* src/window.c (add_to_window_list): use xstrdup to create the
	default value for user_name.

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

	* src/events.c (unmap_notify): fix crash bug in NormalState case.

2003-04-09  Shawn Betts  <sabetts@sfu.ca>

	* configure.in (TERM_PROG): Add doc string

	* src/events.c (receive_command): handle the case when more than
	one client requests a command (fix infinite loop bug).

2003-04-08  Shawn Betts  <sabetts@sfu.ca>

	* src/main.c (WAIT_ANY): define it if it isn't already define.

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

	* src/input.c (read_key): remove the local variable, key_presses.

	* src/Makefile.am (ratpoison_SOURCES): add linkedlist.h

	* src/bar.c (marked_message): pass correct arguments to bar_y.

	* src/actions.c (cmd_defwinliststyle): error messages print the
	correct command name.

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

	* src/actions.h: All cmd_* functions take char* instead of
	void*. All callers updated.

	* src/bar.c (marked_wrapped_message): make the marked line span
	the whole line.

	* src/actions.c (cmd_number): update any frames pointing to the
	windows that have changed.

2003-04-05  Shawn Betts  <sabetts@sfu.ca>

	* src/window.c (get_window_list): if window_list_style is STYLE_COLUMN then
	the end of the mark is the length of the buffer minus the start of
	the mark.

	* src/main.c (init_defaults): init window_list_style to STYLE_ROW.

	* src/input.c (update_input_window): store the height in a
	variable.

	* src/data.h (struct rp_defaults): new member, window_list_style.

	* src/bar.h [message]: wrap msg arg in parens.
	(marked_wrapped_message): new prototype

	* src/bar.c (bar_y): new argument, height. All callers updated.
	(bar_y): use height in calculations.
	(update_window_names): print a column of windows if
	defaults.window_list_style is in column mode.
	(count_lines): new function
	(max_line_length): likewise
	(pos_in_line): likewise
	(line_beginning): likewise
	(marked_wrapped_message): likewise

	* src/actions.c (user_commands): new commands 'verbexec' and
	'defwinliststyle'. Move @end take to after the def* commands.
	(cmd_verbexec): new function. Added prototype.
	(cmd_defwinliststyle): likewise

2003-04-04  Shawn Betts  <sabetts@sfu.ca>

	* src/split.c (set_active_frame): fix NULL pointer crash bug.

	* src/actions.c (cmd_setenv): properly parse the environment name
	and value using strtok.

	* src/window.c (add_to_window_list): init the window's frame_number to EMPTY.

	* src/number.h (numset_clear): new prototype

	* src/manage.c (unmanage)[AUTO_CLOSE]: code update for new globals.

	* src/frame.c (frame_new): init f->last_access to 0.
	(frame_dump): dump the X11 window ID, not the window number.
	(frame_read): new function

	* src/events.c (destroy_window): just unmanage the window.

	* src/actions.h (cmd_fdump): new prototype
	(cmd_frestore): likewise

	* src/actions.c (user_commands): new commands "fdump" and "frestore".
	(cmd_fdump): new function
	(cmd_frestore): likewise

	* src/number.c (numset_clear): new function.

2003-03-31  Shawn Betts  <sabetts@sfu.ca>

	* src/window.c (set_current_window): use current_frame()

	* src/split.h (current_frame): new prototype

	* src/split.c (current_frame): new function
	(current_window): use current_frame()
	(split_frame): likewise
	(remove_all_splits): likewise
	(set_active_frame): likewise
	(show_frame_message): likewise
	(remove_all_splits): use current_screen()

	* src/actions.c (cmd_prev_frame): use current_frame()
	(cmd_next_frame): likewise
	(cmd_select): likewise
	(cmd_h_split): likewise
	(cmd_v_split): likewise
	(cmd_remove): likewise
	(cmd_shrink): likewise
	(cmd_resize): likewise
	(cmd_focusup): likewise
	(cmd_focusdown): likewise
	(cmd_focusleft): likewise
	(cmd_focusright): likewise

2003-03-30  Shawn Betts  <sabetts@sfu.ca>

	* src/split.c (current_window): call screen_get_frame.
	(split_frame): call screen_get_frame to get appropriate structure.
	(split_frame): call find_window_number to get appropriate
	structure.
	(remove_all_splits): call screen_get_frame to get appropriate
	structure.
	(resize_frame): make sure all frames that will be resized are big
	enough for the resize.
	(resize_frame): return int
	(resize_shrink_to_window): call find_window_number to get the
	appropriate structure.
	(resize_frame_right): return int
	(resize_frame_left): likewise
	(resize_frame_top): likewise
	(resize_frame_bottom): likewise
	(resize_frame_horizontally): backup the frameset and restore it if
	the resize fails. Do not allow a frame to be resized too small or
	too big.
	(resize_frame_vertically): likewise
	(remove_frame): call find_window_number to get the appropriate
	structure.
	(set_active_frame): likewise
	(blank_frame): likewise
	(show_frame_message): call screen_get_frame to get the appropriate
	structure.

	* src/screen.c (screen_width): new function (and prototype)
	(screen_height): likewise
	(screen_left): likewise
	(screen_right): likewise
	(screen_top): likewise
	(screen_bottom): likewise
	(screen_copy_frameset): likewise
	(screen_restore_frameset): likewise
	(frameset_free): likewise
	(screen_get_frame): likewise

	* src/split.c (maximize_frame): call screen_width and
	screen_height to get the size for the frame.

	* src/ratpoison.h: include screen.h

	* src/manage.c (move_window):

	* src/frame.h (frame_copy): new prototype
	(frame_dump): likewise

	* src/frame.c (frame_copy): new function
	(frame_dump): likewise

	* src/events.c (unmap_notify): compare frame numbers, not
	pointers.
	(client_msg): call screen_get_frame when blanking the frame.

	* src/data.h (EMPTY): new define
	(struct rp_window_frame): replace the win field with
	win_number. Dependant code updated.
	(struct rp_window): replace frame with frame_number. Dependant
	code updated.
	(struct screen_info): replace rp_current_frame with current_frame
	and change type to int. Dependant code updated.

	* src/Makefile.am (ratpoison_SOURCES): added screen.h and screen.c

2003-03-25  Shawn Betts  <sabetts@sfu.ca>

	* src/split.h (show_frame_message): new prototype

	* src/split.c (show_frame_message): new function

	* src/main.c (init_screen): listen for key release events in the
	key_window and input_window.

	* src/input.c (read_key): new argument, gobble_rel. All callers
	updated.

	* src/actions.c (cmd_remove): only remove the current frame if it
	isn't the ONLY one.
	(cmd_remove): display a message informing the user if the frame
	cannot be removed.
	(cmd_resize): clean up resize loop.
	(cmd_resize): display a window indicating which frame is being
	resized.

2003-03-23  Shawn Betts  <sabetts@sfu.ca>

	* src/split.c (resize_frame_vertically): fix typo error (frame_top
	not frame_left).

2003-03-17  Shawn Betts  <sabetts@sfu.ca>

	* src/split.c (resize_frame_horizontally): only resize to the left
	if the frame isn't against the left side of the screen.
	(resize_frame_vertically): only resize to the left
	if the frame isn't against the top of the screen.

	* src/actions.c (initialize_default_keybindings): add keybindings
	for fselect and resize. Move keybinding for curframe.

	* src/split.c (create_initial_frame): call frame_new to allocate a frame.
	(split_frame): likewise

	* src/main.c (free_screen): call frame_free to free the screen
	frames.

	* src/frame.h (frame_new): new prototype
	(frame_free): likewise

	* src/frame.c (frame_new): new function.
	(frame_free): likewise

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

	* src/Makefile.am (ratpoison_SOURCES): add frame.c and frame.h

	* src/frame.h (frame_left): new prototype
	(frame_top): likewise
	(frame_right): likewise
	(frame_bottom): likewise
	(frame_width): likewise
	(frame_height): likewise
	(frame_resize_left): likewise
	(frame_resize_right): likewise
	(frame_resize_up): likewise
	(frame_resize_down): likewise
	(frame_move_left): likewise
	(frame_move_right): likewise
	(frame_move_up): likewise
	(frame_move_down): likewise

	* src/frame.c (frame_left): new function
	(frame_top): likewise
	(frame_right): likewise
	(frame_bottom): likewise
	(frame_width): likewise
	(frame_height): likewise
	(frame_resize_left): likewise
	(frame_resize_right): likewise
	(frame_resize_up): likewise
	(frame_resize_down): likewise
	(frame_move_left): likewise
	(frame_move_right): likewise
	(frame_move_up): likewise
	(frame_move_down): likewise

	* src/split.c (resize_frame): new function
	(resize_frame_right): likewise
	(resize_frame_left): likewise
	(resize_frame_top): likewise
	(resize_frame_bottom): likewise
	(resize_frame_horizontally): use resize_frame_right and
	resize_frame_left to do the resizing.
	(resize_frame_vertically):  use resize_frame_top and
	resize_frame_bottom to do the resizing.

	* src/ratpoison.h (PRINT_ERROR): flush stdout
	(PRINT_DEBUG): likewise
	include frame.h

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

	* src/split.h (find_frame_number): new prototype

	* src/split.c (create_initial_frame): give a number to the
	initial frame
	(split_frame): give the new frame a unique number
	(split_frame): add the new frame after the current frame
	(remove_all_splits): return the frame's number when deleting it.
	(remove_frame): likewise
	(find_frame_number): new function

	* src/main.c (init_screen): initialize the frames_numset member
	(free_screen): free the frames_numset member

	* src/data.h (struct screen_info): new member, frames_numset

	* src/actions.h (cmd_fselect): new prototype

	* src/actions.c (user_commands): new command "fselect"
	(cmd_fselect): new function

	* src/Makefile.am (ratpoison_SOURCES): remove list.h and list.c,
	add window.c and window.h

	* src/ratpoison.h: include window.h instead of list.h

	* src/main.c (main): call init_window_stuff(). Remove call to init_numbers().
	(clean_up): call free_window_stuff(). Remove call to free_numbers().

	* src/list.h (free_window_stuff): new prototype
	(init_window_stuff): likewise

	* src/list.c (rp_window_numset): new global
	(init_window_stuff): new function
	(free_window_stuff): new function

	* src/data.h (rp_window_numset): new extern

	* src/number.c (numset_init): new function
	(number_is_taken): rename to numset_num_is_taken, callers updated.
	(find_empty_cell): rename to numset_find_empty_cell, callers updated.
	(add_window_number): rename to numset_add_num, callers updated.
	(return_window_number): rename to numset_release, callers updated.
	(init_numbers): remove function
	(free_numbers): rename to numset_free, callers updated.
	(numset_num_is_taken): take struct numset* as an argument.
	(numset_find_empty_cell): likewise
	(numset_add_num): likewise
	(numset_request): likewise
	(numset_release): likewise
	(numset_free): likewise
	(numset_new): new function

2003-02-27  Shawn Betts  <sabetts@sfu.ca>

	* src/main.c (free_screen): new function
	(clean_up): call free_screen on each screen. free the screen
	array. free defaults.window_fmt.

	* src/number.h (free_numbers): new prototype

	* src/number.c (free_numbers): new function

	* src/manage.c (get_wmname): use XGetWindowProperty to get the
	window name.
	(unmanaged_window): free wname after using it.

	* src/main.c (wm_name): new global
	(main): internalize WM_NAME atom.
	(clean_up): free data structures for keybindings, aliases, the
	bar, window numbers, and input history.

	* src/input.h (free_history): new prototype

	* src/input.c (free_history): new function

	* src/events.c (execute_remote_command): free properties returned
	by XGetWindowProperty().

	* src/data.h (wm_name): new extern

	* src/communications.c (recieve_command_result): free properties
	returned by XGetWindowProperty().

	* src/bar.h (free_bar): new prototype

	* src/bar.c (update_window_names): bar_buffer is not static.
	(update_window_names): free bar_buffer after using it.
	(marked_message): free the GC after using it.
	(free_bar): new function.

	* src/actions.h (free_keybindings): new prototype
	(free_aliases): likewise

	* src/actions.c (free_keybindings): new function
	(free_aliases): likewise
	(cmd_tmpwm): unmap the key window before calling the new wm, and
	remap it afterwards.

2003-02-24  Shawn Betts  <sabetts@sfu.ca>

	* src/actions.c (cmd_tmpwm): unmap the key window before spawning
	the wm and map it afterwards.

2003-02-23  Shawn Betts  <sabetts@sfu.ca>

	* src/split.c (remove_all_splits): fix bug hiding windows not in
	the current frame.

	* src/split.h (cleanup_frame): new protoype

	* src/manage.c (scanwins): added better debugging output

	* src/events.c (cleanup_frame): move to split.c
	(handle_key): ungrab the rat right after we read the key.

	* src/actions.h (cmd_tmpwm): new prototype.

	* src/actions.c (spawn): return the pid of the child
	process. prototype updated.
	(cmd_tmpwm): new function
	(user_commands): new command, tmp_wm.

2003-02-22  Shawn Betts  <sabetts@sfu.ca>

	* configure.in: don't check for variable argument support in
	preprocessor.

	* src/ratpoison.h (PRINT_LINE): new macro.
	(PRE_PRINT_LOCATION): remove macro
	(PRINT_ERROR): takes one argument which is the argument list
	,parens and all, to be passed to printf. Callers updated.

	* src/linkedlist.h (list_direction_entry): no longer returns NULL
	if there is only one element in the list. Instead, returns the
	same element again and again.

	* src/actions.c (cmd_number): use list delete entry macro
	(cmd_number): likewise
	(cmd_escape): use list looping macro
	(cmd_escape): likewise
	(cmd_defpadding): likewise
	(cmd_defborder): likewise

	* src/data.h: include linkedlist.h
	(struct rp_window_frame): use struct list_head instead of next,
	prev pointers.
	(struct rp_window): likewise
	(struct screen_info): rename rp_window_frame_sentinel to
	rp_window_frames and change it's type to list_head.

	* src/events.c (mapping_notify): use list looping macro
	(mapping_notify): likewise

	* src/list.c: rename rp_unmapped_window_sentinel to
	rp_unmapped_window and rp_mapped_window_sentinel to
	rp_mapped_window. Use LIST_HEAD to create them. externs updated.
	(add_to_window_list): use list add entry macro.
	(find_window_in_list): list head is of type list_head. Prototype
	and callers updated.
	(find_window_in_list): use list looping macro
	(init_window_list): remove function
	(find_window_number): use list looping macro
	(find_window_name): likewise
	(find_window_prev): use list previous entry macro
	(find_window_next): use list next entry macro
	(find_window_other): use list looping macro
	(append_to_list): remove function
	(insert_into_list): use list looping macro
	(insert_into_list): use list add entry macro
	(remove_from_list): remove function
	(get_window_list): use list looping macro

	* src/main.c (main): do not call init_window_list()

	* src/manage.c (unmanage): use list delete macro
	(map_window): likewise
	(withdraw_window): use list moving macro to move entry to
	another list.
	(hide_others): use list looping macro

	* src/split.c (num_frames): use list looping macro
	(frames_screen): likewise
	(maximize_all_windows_in_frame): likewise
	(delete_frame_from_list): remove function
	(create_initial_frame): remove list init code. Add current frame
	to screen's frame list.
	(init_frame_list): use list init macro
	(find_last_frame): use list looping macro
	(find_windows_frame): likewise
	(find_frame_next): use list next entry macro
	(find_frame_prev): use list previous entry macro
	(find_window_for_frame): use list looping macro
	(split_frame): use list add entry macro
	(remove_all_splits): use list looping macro
	(resize_frame_vertically): likewise
	(resize_frame_horizontally): likewise
	(total_frame_area): likewise
	(frame_overlaps): likewise
	(remove_frame): likewise
	(find_frame_up): likewise
	(find_frame_down): likewise
	(find_frame_left): likewise
	(find_frame_right): likewise

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

	* src/split.h (num_frames): new prototype
	(resize_shrink_to_window): likewise
	(resize_frame_vertically): likewise
	(resize_frame_horizontally): likewise

	* src/split.c (num_frames): no longer a static function
	(resize_shrink_to_window): new function
	(resize_frame_vertically): likewise
	(resize_frame_horizontally): likewise

	* src/main.c (init_defaults): init frame_resize_unit.

	* src/data.h (struct rp_defaults): new member frame_resize_unit.

	* src/conf.h (RESIZE_VGROW_KEY): new define
	(RESIZE_VGROW_MODIFIER): likewise
	(RESIZE_VSHRINK_KEY): likewise
	(RESIZE_VSHRINK_MODIFIER): likewise
	(RESIZE_HGROW_KEY): likewise
	(RESIZE_HGROW_MODIFIER): likewise
	(RESIZE_HSHRINK_KEY): likewise
	(RESIZE_HSHRINK_MODIFIER): likewise
	(RESIZE_SHRINK_TO_WINDOW_KEY): likewise
	(RESIZE_SHRINK_TO_WINDOW_MODIFIER): likewise
	(RESIZE_END_KEY): likewise
	(RESIZE_END_MODIFIER): likewise

	* src/actions.h (cmd_shrink): new prototype
	(cmd_resize): likewise
	(cmd_defresizeunit): likewise

	* src/actions.c (user_commands): add commands cmd_resize and
	cmd_shrink, and cmd_defresizeunit.
	(cmd_shrink): new function
	(cmd_resize): likewise
	(cmd_defresizeunit): likewise

2003-01-30  Shawn Betts  <sabetts@sfu.ca>

	* src/actions.c (cmd_bind): more informative error messages
	(cmd_unbind): likewise
	(cmd_source): likewise
	(cmd_select): likewise
	(cmd_number): likewise
	(cmd_escape): likewise
	(cmd_h_split): likewise
	(cmd_v_split): likewise
	(cmd_rudeness): likewise
	(cmd_gravity): likewise
	(cmd_defwingravity): likewise
	(cmd_deftransgravity): likewise
	(cmd_defmaxsizegravity): likewise
	(cmd_msgwait): likewise
	(cmd_defbargravity): likewise
	(cmd_defbargravity): likewise
	(cmd_defborder): likewise
	(cmd_defbarborder): likewise
	(cmd_definputwidth): likewise
	(cmd_definputwidth): only accept input widths >=0
	(cmd_chdir): add error message if HOME environment variable is not
	set.
	(cmd_chdir): add error message if chdir fails.
	(cmd_rudeness): only accept rudeness numbers between 0 and 15
	(cmd_msgwait): only accept waiting times >=0

2003-01-25  Shawn Betts  <sabetts@sfu.ca>

	* src/actions.c (cmd_help): Print key binding when called
	non-interactively.
	(cmd_defwaitcursor): error message correctly shows what command
	the error occurred in.
	(cmd_rudeness): rudeness data correctly stored in rudeness
	variables.

2002-12-11  Shawn  <sabetts@sfu.ca>

	* configure.in (AC_CHECK_FUNCS): Add check for putenv, remove
	check for setenv and unsetenv.

	* src/actions.c (setenv): remove function
	(unsetenv): likewise
	(cmd_setenv): use putenv instead of setenv.
	(cmd_unsetenv): likewise

2002-12-09  Shawn Betts  <sabetts@sfu.ca>

	* src/actions.c (spawn): only add DISPLAY to the environment if it
	isn't already there.

2002-11-24  Shawn Betts  <sabetts@sfu.ca>

	* src/main.c: include sys/wait.h
	(chld_handler): new function

	* src/events.c: include sys/wait.h
	(handle_signals): Print an error message in the case of a child
	signal.

	* src/data.h (struct rp_child_info): New struct.
	(child_info): New global.
	(chld_signalled): likewise

	* src/actions.c (spawn): Let the SIGCHLD handler handle process
	completion instead of doing an ugly dance.

2002-11-20  Shawn Betts  <sabetts@sfu.ca>

	* src/ratpoison.h[!HAVE_VARARG_MACROS]: PRINT_ERROR and
	PRINT_DEBUG are defined as void macros.

	* src/events.c (client_msg): Add semicolon to the end of a
	PRINT_DEBUG line.

	* src/actions.c (cmd_bind): typecast data as a (char *) before
	using it in (char *) pointer arithmetic.

	* configure.in: Add check to see if the preprocessor has variable
	argument macro capabilities.

	* src/main.c (init_defaults): set pointer warping to on by
	default.

	* src/list.c (give_window_focus): only warp the pointer if the
	warp setting is turned on.

	* src/data.h (struct rp_defaults): new member, warp.

	* src/actions.h (cmd_ward): new prototype

	* src/actions.c (user_command): new command "warp"
	(cmd_warp): new function

2002-10-18  Shawn Betts  <sabetts@sfu.ca>

	* src/actions.c (read_split): a negative number means subtract the
	pixels from the frame's current size to get the new frame's size.

	* src/split.c (VERTICALLY): new define
	(VERTICALLY): likewise
	(split_frame): new argument 'pixels'. The current frame is split
	and resized to 'pixels' pixels.
	(v_split_frame): new argument 'pixels'. prototype updated.
	(h_split_frame): likewise

	* src/actions.c (user_commands): hsplit, vsplit, and split take a
	string argument.
	(read_split): new function
	(cmd_h_split): takes a ratio or number to determine how big the
	frame split will be.
	(cmd_v_split): likewise

2002-08-31  Shawn Betts  <sabetts@vcn.bc.ca>

	* src/actions.c (cmd_bind): malloc the correct amount of memory for keydesc
	(cmd_unbind): likewise

2002-07-28  Shawn Betts  <sabetts@vcn.bc.ca>

	* src/main.c (handler): do not report badwindow errors if
	IGNORE_BADWINDOW is define.

	* src/conf.h (IGNORE_BADWINDOW): new define

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

	* src/actions.c (cmd_help): key descriptions don't run off the
	bottom of the screen.

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

	* src/actions.c (command): look for the command in the aliases
	before looking in the command list.

	* src/actions.h (cmd_unalias): new prototype

	* src/actions.c (user_commands): new command unalias
	(cmd_unalias): new function

2002-04-25  Gergely Nagy  <algernon@debian.org>

	* src/actions.c: include <strings.h>
	include setenv implementation if HAVE_SETENV is not set,
	OR setenv is not defined (removes a compiler warning on
	AIX)
	* src/events.c: include <strings.h>
	* src/getopt.c: include <strings.h>

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

	* src/actions.c (cmd_nextscreen): An error message is displayed
	when there is only 1 screen.
	(cmd_prevscreen): likewise

	* src/split.c (set_active_frame): fix to operate properly with
	multiple screens.

	* src/data.h (struct rp_window_frame): new data member 'number'.

	* src/actions.h (cmd_prevscreen): new prototype
	(cmd_nextscreen): likewise

	* src/actions.c (user_commands): new commands "nextscreen" and
	"prevscreen"
	(cmd_nextscreen): new function
	(cmd_prevscreen): likewise

2002-02-19  Shawn Betts  <sabetts@vcn.bc.ca>

	* src/split.c: include string.h

	* src/sbuf.c: likewise

	* src/events.c: likewise

	* src/communications.c: likewise

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

	* src/manage.c (update_normal_hints): fix debugging output to be
	more readable.

	* src/events.c (configure_request): call XSync after granting
	configure request.
	(property_notify): maximize the window on receiving a normal hints
	property change.

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

	* src/manage.c (maximize): remove calls to XSelectInput.
	(force_maximize): likewise
	(unhide_window): likewise
	(unhide_window_below): likewise

	* src/events.c (configure_notify): remove function.
	(configure_request): grant the request, then immediately maximize
	the window.
	(delegate_event): ignore ConfigureNotify events.
	(configure_request): grant the request if ratpoison isn't managing
	the window.

2002-02-14  Shawn Betts  <sabetts@vcn.bc.ca>

	* src/actions.c (cmd_license): redraw the bar if it was visible.
	(cmd_help): likewise

	* configure.in: fix the --enable-debug help string.

	* src/events.c (configure_request): Ignore the configure notify
	event caused by the geometry change if the window is not mapped.

	* src/manage.c (maximize_transient): correctly detect when the
	window is bigger than its frame.
	(maximize): ignore the structure events generated by the maximize
	(force_maximize): likewise
	(unhide_window): likewise
	(unhide_window_below): likewise

	* src/events.c (configure_notify): Clear up ambiguous debugging
	output.
	(configure_request): initialize the changes structure to the
	window's current attributes.

2002-02-07  Shawn Betts  <sabetts@vcn.bc.ca>

	* src/split.h (find_last_frame): prototype now correctly reflects
	the actual function.

	* src/events.c (configure_notify): ignore substructurenotify
	events. Add more debugging statements.

	* src/actions.c (cmd_focuslast): pass the current screen to the
	call to find_last_frame.

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

	* src/actions.c (cmd_defbarpadding): print an error message if
	defbarpadding is called interactively without arguments.

	* src/events.c (handle_signals): only hide the bar if it times
	out.

	* src/bar.c (marked_message): Fix text marking bug.

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

	* src/actions.c (command): bail out if alias recursion gets too deep.

	* src/conf.h (MAX_ALIAS_RECURSIVE_DEPTH): new define

	* src/bar.c (bar_x): update to work with all X11 gravity values.
	(bar_y): likewise

	* src/actions.c (cmd_defbargravity): Rename from
	cmd_defbarloc. Dependant code updated.
	(cmd_defbargravity): accept all gravity arguments.

2002-01-26  shawn  <sabetts@vcn.bc.ca>

	* configure.in: check for the vsnprintf function and stdarg.h
	header.

	* src/main.c (xvsprintf): Cleaned up to call vsnprintf only in one
	place. wrap the vsnprintf call with va_copy (or __va_copy) and
	va_end.

	* src/list.c (format_window_name): If res_class or res_name are
	NULL use "None" instead.

	* src/actions.c (alias_t): rename data structure from cmd_alias to
	avoid a name clash with the function cmd_alias. Dependant code
	updated.

	* src/list.c (set_active_window): Corrected a bug in determining
	what a maxsize window is. Only one of width or height must be less
	than the screen width or height for a window to qualify as a
	maxsize window.

2002-01-24  shawn  <sabetts@vcn.bc.ca>

	* src/actions.c (cmd_defbarloc): Read the location argument as a
	gravity argument using parse_wingravity.
	(cmd_defbgcolor): don't set the background color for key_window.
	(cmd_deffgcolor): don't set the foreground color for key_window.

	* src/messages.h (MESSAGE_FRAME_STRING): Pad the string with
	spaces on both sides.

	* src/main.c (init_screen): Create the frame, input, and bar
	windows with a border width of defaults.bar_border_width.
	(init_defaults): initialize defaults.bar_border_width

	* src/bar.c (bar_x): Incorporate defaults.bar_border_width into
	calculations.
	(bar_y): likewise

	* src/actions.h (cmd_defbarborder): new prototype

	* src/actions.c (user_commands): new command "defbarborder"
	(cmd_defbarborder): new function

	* src/main.c (init_screen): create the help window with a 0 border
	width.

	* src/actions.c (find_alias_index): new function
	(cmd_alias): When an alias is already in the alias list, replace
	it with the new alias.
	(command): Append to the end of alias command the arguments passed
	in before evaluating the alias.

	* src/events.c (configure_request): do not send a synthetic
	configure notify event.

	* src/actions.c (wingravity_to_string): Fix the north gravity
	string to return "n" not "ng".
	(cmd_defborder): return NULL when no (or a bad) argument is passed
	in.

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

	* src/manage.c (send_configure): Change parameters to X11 window,
	x, y, width, height and border. Prototype updated. All callers
	updated.

	* src/events.c (configure_request): For the changes variable, fill
	in geometry parameters not part of the request with the
	window's geometry.

	* src/manage.c (update_normal_hints): improve debugging output.

2002-01-17  Gergely Nagy  <algernon@debian.org>

	* debian/changelog: update for a new snapshot

	* doc/ratpoison.1, doc/ratpoison.texi (Keystrokes): removed
	false statement that C-t C-: is bound to colon.

2002-01-15  Shawn Betts  <sabetts@sfu.ca>

	* src/input.c (keysym_to_string): handle the case when
	XKeysymToString returns NULL.

2002-01-11  shawn  <sabetts@vcn.bc.ca>

	* src/main.c (handler): store the error text at the beginning of
	the string instead of 7 bytes in.

2002-01-10  shawn  <sabetts@vcn.bc.ca>

	* src/events.c (delegate_event): ignore the CirculateRequest event.

	* src/actions.c (cmd_rename): Allows the user to specify a second
	argument which is the number of the window whose number will be
	set to the first argument.

2002-01-09  Gergely Nagy  <algernon@debian.org>

	* src/actions.c (setenv, unsetenv): new functions, used when
	the system libc does not have them.

	* configure.in: check for the presence of setenv and unsetenv.

2002-01-02  shawn  <sabetts@vcn.bc.ca>

	* src/main.c (init_screen): do not select on any events for the
	bar_window and the frame_window.

	* src/events.h (listen_for_events): new prototype

	* src/events.c (configure_notify): If the event dimensions don't
	match the windows, then re-maximize the window.
	(configure_request): always grant the requests.
	(delegate_event): Changes to the debugging output.
	(delegate_event): Don't print debugging messages for events that
	ratpoison doesn't need to handle.
	(handle_signals): new function
	(listen_for_events): new function
	(handle_events): remove function. Dependant code uses
	listen_for_events.
	(get_event): likewise

	* src/manage.h (get_state): new prototype

	* src/manage.c (update_normal_hints): print only the hints that
	are set as debugging output.
	(scanwins): collect mapped and iconized windows.
	(get_state): new function

	* src/main.c (clean_up): don't map iconized windows.

2001-12-21  shawn  <sabetts@vcn.bc.ca>

	* src/actions.h (cmd_alias): new prototype

	* src/actions.c (user_commands): remove "license" from the
	unimplemented section.
	(user_commands): new command "alias"
	(cmd_alias): new function
	(command): handle aliases
	(initialize_default_keybindings): initialize the alias list
	(struct cmd_alias): new struct
	(alias_list): new static global
	(alias_list_size): likewise
	(alias_list_last): likewise

	* src/actions.h (cmd_license): new prototype

	* src/actions.c (cmd_license): new function
	(user_commands): new command "license"
	(initialize_default_keybindings): bind "license" to V and C-V

	* src/list.c (format_window_name): print unrecognized formatting
	options.

	* src/manage.c (unmanage): set the kill_signalled variable.

	* src/actions.c (wingravity_to_string): new function
	(cmd_gravity): return the current value when data is NULL
	(cmd_defwingravity): likewise
	(cmd_deftransgravity): likewise
	(cmd_defmaxsizegravity): likewise
	(cmd_msgwait): likewise
	(cmd_defbarloc): likewise
	(cmd_defpadding): likewise
	(cmd_defborder): likewise
	(cmd_definputwidth): likewise
	(cmd_defwaitcursor): likewise
	(cmd_defwinfmt): likewise
	(cmd_defwinname): likewise
	(cmd_defbarpadding): likewise
	(cmd_startup_message): likewise
	(cmd_rudeness): likewise

	* src/sbuf.h (sbuf_printf_concat): new prototype
	(sbuf_printf): likewise

	* src/sbuf.c (sbuf_printf_concat): new function
	(sbuf_printf): likewise

	* src/ratpoison.h: include stdarg.h
	(xvsprintf): new prototype
	(xsprintf): likewise

	* src/main.c (xvsprintf): new function
	(xsprintf): likewise

	* src/bar.c: remove include of stdarg.h
	(marked_message_printf): call xvsprintf.

	* src/input.c (input_history): new static global
	(input_num_history_entries): likewise
	(get_more_input): cycle through the input history.

	* src/conf.h (INPUT_PREV_HISTORY_KEY): new define
	(INPUT_PREV_HISTORY_MODIFIER): likewise
	(INPUT_NEXT_HISTORY_KEY): likewise
	(INPUT_NEXT_HISTORY_MODIFIER): likewise
	(INPUT_MAX_HISTORY): likewise

	* src/input.c (update_input_window): Draw the cursor in the right place.

	* src/actions.h (cmd_defbarpadding): new prototype

	* src/actions.c (user_commands): new command entry "defbarpadding"
	(cmd_defbarpadding): new function

	* src/data.h (rp_error_msg): new global extern

	* src/main.c (rp_error_msg): new global variable

	* src/events.c (get_event): If there is an X11 error message to
	print, print it.

	* src/main.c (handler): record the error in rp_error_msg

2001-12-20  shawn  <sabetts@vcn.bc.ca>

	* src/manage.c (maximize_transient): always honour the current
	size of the window.

	* src/actions.c (cmd_info): print "Transient" if the window is a
	transient window.

2001-12-18  shawn  <sabetts@vcn.bc.ca>

	* src/manage.c (maximize_transient): Fit the transient window
	inside its frame.

2001-12-11  shawn  <sabetts@vcn.bc.ca>

	* src/actions.c (parse_keydesc): Don't mangle the key description
	argument.

2001-12-11  Ryan C Yeske  <rcyeske@sfu.ca>

	* contrib/genrpbindings: Add ruby bindings.  From Doug Kearns
	<djkea2@mugc.its.monash.edu.au>.

2001-12-08  shawn  <sabetts@vcn.bc.ca>

	* src/events.c (handle_key): revert the focus immediately after
	reading the key.

	* src/list.c (give_window_focus): update rp_current_frame when
	setting the window focus.

	* src/main.c (main): scan for windows in a seperate pass after
	initializing the screen structures.
	(init_screen): build a display string for each screen.
	(init_screen): remove the call to scanwins.

	* src/manage.c (current_screen): return the current screen using
	rp_current_screen.

	* src/split.h (init_frame_lists): new function

	* src/split.c (rp_window_frame_sentinel): remove.
	(rp_current_frame): remove.
	(frames_screen): new function
	(maximize_frame): use the frame's screen to find out the width and
	height of the display.
	(create_initial_frame): take a pointer to a screen_info as an
	argument.
	(init_frame_lists): new function
	(init_frame_list): take a pointer to a screen_info as an argument.
	(find_last_frame): take a pointer to a screen_info as an argument.

	* src/actions.c (spawn): Set the DISPLAY environment variable to
	point to the current screen.

	* src/data.h (struct screen_info): add display_string,
	rp_window_frame_sentinel, rp_current_frame.
	(rp_current_screen): new global
	(rp_current_frame): Remove. Dependant code uses
	screen_info.rp_current_frame.

2001-12-09  Gergely Nagy  <algernon@debian.org>

	* debian/changelog: Lets have a snapshot release
	* debian/control: Changed Maintainer, and added an Uploaders field
	* debian/ratpoison.examples: added the files in contrib/
	* doc/Makefile.am (EXTRA_DIST): removed ratpoisonrc-mode.el
	* contrib/Makefile.am (EXTRA_DIST, pkgdata_DATA): added genrpbindigs

2001-12-05  Ryan C Yeske  <rcyeske@sfu.ca>

	* contrib/genrpbindings: Fix perl typos.  From Doug Kearns
	<djkea2@mugc.its.monash.edu.au>.

2001-12-04  Ryan C Yeske  <rcyeske@sfu.ca>

	* contrib/genrpbindings: New file.

	* src/actions.c (user_commands): Add markup for genrpbindings.
	(cmd_getenv): New function.

2001-10-18  shawn  <sabetts@vcn.bc.ca>

	* src/split.c (show_frame_indicator): call XSync after clearing the window.

	* src/input.c (get_more_input): clear the window after it is
	raised. Call XSync aftwards.

	* src/conf.h (MAX_LINK_DEPTH): new define

	* src/bar.c (marked_message): clear the window after it is
	raised. Call XSync aftwards.

	* src/actions.h (cmd_link): new prototype

	* src/actions.c (user_command): new command 'link'
	(find_command_by_keydesc): new function
	(resolve_command_from_keydesc): likewise
	(cmd_link): likewise

	* src/split.h (find_last_frame): new prototype

	* src/split.c (update_last_access): new function
	(find_last_frame): likewise
	(split_frame): update the new frame's last_access field
	(set_active_frame): update the new current frame's last_access field

	* src/input.h (x11_mask_to_rp_mask): new prototype
	(rp_mask_to_x11_mask): likewise

	* src/input.c (x11_mask_to_rp_mask): new function
	(rp_mask_to_x11_mask): likewise

	* src/events.c (handle_key): convert X11 modifier masks to rp
	modifier masks where appropriate.

	* src/actions.h (cmd_focuslast): new prototype

	* src/actions.c (initialize_default_keybindings): new keybinding
	for "focuslast"
	(cmd_focuslast): new function
	(user_command): new command "focuslast"

	* src/data.h (struct rp_window_frame): new field 'last_access'
	(RP_CONTROL_MASK): new define. All code depending on the X11
	modifier mask equivalent has been changed to use this where
	appropriate.
	(RP_META_MASK): likewise
	(RP_ALT_MASK): likewise
	(RP_SUPER_MASK): likewise
	(RP_HYPER_MASK): likewise

2001-10-11  shawn  <sabetts@vcn.bc.ca>

	* src/bar.c (show_last_message): abort if there was no last
	message.

	* src/events.c (configure_request): Always check the rudeness
	level before honouring a raise request.

2001-10-09  shawn  <sabetts@vcn.bc.ca>

	* src/split.c (remove_frame): Make sure the frame attempting to
	take up the space of the deleted frame overlaps the deleted frame
	after the size change.
	(remove_frame): More debug messages

	* src/list.c (format_window_name): add formatting option '%l' to
	grab the last_access field from the window.

2001-10-05  Gergely Nagy  <algernon@debian.org>

	* contrib/ratpoisonrc-mode.el: superceded by..
	* contrib/ratpoison.el: ..this one, now with AllYou'llEverNeed(tm)

2001-10-01  shawn  <sabetts@vcn.bc.ca>

	* src/bar.c (marked_message_printf): Hand                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                         