2001-08-18 Shawn * src/events.c (configure_request): grant Iconized and Withdrawn windows any geometry they like. * src/list.c (is_transient_ancestor): make sure tmp is a valid pointer before testing if it is a transient. * src/main.c (read_rc_file): free the command's result string. * src/list.h (get_window_list): new prototype * src/list.c (get_window_list): new function * src/events.c (handle_key): free the command's result string. (receive_command): send the command's result string if there is one, otherwise send NULL. * src/communications.c (recieve_command_result): only print the result if the string is not empty. * src/bar.c (update_window_names): calls get_window_list. * src/actions.c (cmd_windows): return a list of the windows when called non-interactively. (cmd_colon): free the command result. * src/actions.c: command functions have been changed to return a result string and take a parameter that tells the function if it was called interactively or not. All callers updated. * src/split.c (split_frame): unhide transient_for windows as well as the active window. (remove_all_splits): hide transient_for windows as well as the frame's active window. * src/manage.c (unhide_below_window): always lower the window * src/list.h (hide_transient_for_between): new prototype (is_transient_ancestor): likewise * src/list.c (hide_transient_for_between): new function (hide_transient_for): calls hide_transient_for_between (is_transient_ancestor): new function (set_active_window): don't temporarily hide windows that the newly active window is a transient for (removes unnecessary flicker). * src/events.c (cleanup_frame): don't temporarily hide windows that the new window is a transient for (removes unnecessary flicker). 2001-08-07 Ryan Yeske * doc/ratpoison.texi: Fix spelling and grammar. 2001-06-29 Gergely Nagy <8@free.bsd.hu> * Makefile.am: do not include debian/ in the tarball * configure.in: better xterm checking, fixes #430631 2001-06-11 shawn * src/events.c (grab_rat): wrap in ifdef (ungrab_rat): likewise (handle_key): only change the mouse icon if USE_WAITFORKEY_CURSOR is defined. * src/conf.h (USE_WAITFORKEY_CURSOR): new define 2001-06-10 shawn * src/actions.c (cmd_generate): return if there is no current window. * src/split.c (split_frame): empty frames can be split. * src/main.c (rp_rat_bits): remove (rp_rat_mask_bits): remove include (sighandler): only increment kill_signalled (hup_handler): only increment hup_signalled (alrm_handler): only increment alarm_signalled (read_startup_files): use PRINT_ERROR for error messages. (init_rat_cursor): Use a standard X cursor for the screen's rat. * src/events.h (unmap_notify): remove prototype (delegate_event): likewise (key_press): likewise (keymapstate): likewise (map_request): likewise * src/events.c: includes and (new_window): static function (unmap_notify): likewise (map_request): likewise (destroy_window): likewise (configure_notify): likewise (configure_request): likewise (key_press): likewise (property_notify): likewise (colormap_notify): likewise (delegate_event): likewise (get_event): new function (more_destroy_events): remove function (handle_events): call get_event. * src/data.h: rp_current_event is an XEvent dependant code updated. new globals alarm_signalled, kill_signalled, hup_signalled. * src/actions.c (initialize_default_keybindings): new bindings for "split" and "vsplit". 2001-06-06 Shawn Betts * src/list.c (unhide_transient_for): abort if the transient_for window can't be found. (hide_transient_for): likewise 2001-06-01 Shawn Betts * src/events.c (map_request): If the window is iconified call set_active_window on it. 2001-06-05 shawn * src/list.c (set_active_window): calls give_window_focus which was accidentally removed. * src/actions.c (parse_keydesc): return NULL if the keydesc is a '-'. * src/manage.c (hide_window): ignore only StructureNotify events. * src/data.h (WIN_EVENTS): Add StructureNotifyMask. * src/events.c (unmap_notify): ignore SubstructureNotify unmaps. 2001-06-02 shawn * src/split.c (blank_frame): hide transient's transient_for. * src/manage.c (unhide_below_window): new function * src/manage.h (unhide_below_window): new prototype * src/list.h (unhide_transient_for): new prototype (hide_transient_for): likewise * src/list.c (unhide_transient_for): new function (hide_transient_for): likewise (set_active_window): print the name of the last and new windows. (set_active_window): unhide new window's transient_for. hide old window's transient_for. * src/events.c (cleanup_frame): hide any transients for the old window and unhide any transients for the new one. * src/manage.c (hide_window): ignore unmap_notify events when unmapping the window. * src/list.c (add_to_window_list): use WIN_EVENTS in XSelectInput. * src/data.h (struct rp_window): remove iconizing field. remove code using iconizing. (WIN_EVENTS): new define 2001-06-01 shawn * src/events.c (cleanup_frame): hide the frame's window's transient_for windows. 2001-05-24 Shawn Betts * src/events.c (colormap_notify): ignore badwindows when retrieving and installing the colormap. * src/manage.c (withdraw_window): ignore badwindows during all Xlib calls. 2001-05-22 Shawn Betts * src/actions.c (cmd_generate): only generate the event if there is a current window. 2001-05-18 Shawn Betts * src/input.c (update_modifier_map): rename from init_modifier_map. all callers updated. prototype updated. * src/events.c (mapping_notify): new function (delegate_event): handle MappingNotify events. 2001-05-09 Gergely Nagy <8@free.bsd.hu> * ratpoison.spec: spec file for rpm-based systems 2001-05-03 Gergely Nagy <8@free.bsd.hu> * debian/control: adjust build-depends to potato * debian/rules: fixed, so it works under both potato and woody/sid 2001-04-19 Shawn Betts * src/manage.c (unhide_window): map and raise the window. 2001-04-18 shawn * src/input.c (keysym_to_string): handles control, meta, alt, hyper, and super modifiers. Returns full keysym names. * src/actions.c (parse_keydesc): parses control, meta, alt, hyper, and super modifiers. (cmd_clock): sets the last character in msg to 0. 2001-04-15 shawn * src/split.c (show_frame_indicator): contents of update_frame_indicator merged into here. (update_frame_indicator): remove function * src/number.h (add_window_number): new prototype * src/number.c (add_window_number): renamed from add_to_list. Dependant code updated. * src/messages.h (MESSAGE_WINDOW_INFORMATION): new define * src/list.h (print_window_information): new prototype * src/list.c (print_window_information): new function * src/actions.h (cmd_number): new prototype * src/actions.c (cmd_clock): remove newline from date string. (cmd_rename): passes current_screen() to update_window_names. (cmd_number): new function * src/messages.h (MESSAGE_WELCOME): new define * src/manage.c (scanwins): ignore the help window (hide_window): increment window's iconizing variable * src/main.c (main): display welcoming message (init_screen): create the help window (init_screen): don't map the frame indicator window (clean_up): destroy the help window * src/list.c (add_to_window_list): initialize iconizing to 0 * src/events.c (new_window): skip help_window (unmap_notify): skip normal processing if the event is from iconizing the window. (unmap_notify): clean up the window's frame if it is being withdrawn. * src/data.h (struct screen_info): new variable help_window * src/bar.c (update_window_names): only print the window list if the bar is already displaying the window list. * src/actions.h (cmd_help): new prototype (cmd_quit): likewise * src/actions.c (initialize_default_keybindings): new keybinding for "help" (cmd_quit): new function (cmd_help): likewise 2001-04-13 shawn * src/actions.c (cmd_clock): doesn't allocate memory. displays the date. * src/split.h (blank_frame): new prototype * src/split.c (split_frame): calls unhide_window after maximizing the new frame's window. (remove_all_splits): hide all windows but the current one (remove_all_splits): maximize the current window in its newly resized frame. (remove_frame): hide the frame's window after removing it from the list. (blank_frame): new function * src/manage.h (withdraw_window): new prototype (hide_window): likewise (unhide_window): likewise * src/manage.c (scanwins): glob ignored windows into 1 if statement. (scanwins): set the window's state to NormalState before calling map_window. (set_state): sets win->state (map_window): calls set_state (hide_window): new function (unhide_window): likewise (withdraw_window): new function * src/main.c (main): setup error handlers after --command, --restart, and --kill commands have been processed. (main): doesn't call set_active_window (init_screen): XSync's after selecting ewents on the root window. (clean_up): map iconized windows * src/list.h (give_window_focus): prototype updated * src/list.c (give_window_focus): takes a second argument, last_win. (give_window_focus): calls unhide_window (give_window_focus): uses last_win instead of current_window() (set_active_window): hides the last window and unhides the new window. (set_active_window): calls give_window_focus * src/events.c (cleanup_frame): maximizes the frame's new window (unmap_notify): do nothing if the window is in the iconic state. Withdraw the window if it is in the normal state. (map_request): calls unhide_window if the window is iconized. Do nothing if it is already mapped. (destroy_window): tightened up (client_msg): detects iconize requests from clients. * src/data.h (STATE_UNMAPPED): remove. Dependant code uses WithdawnState in its stead. (STATE_MAPPED): likewise. Dependant code uses NormalState in its stead * src/actions.c (initialize_default_keybindings): new keybinding - bound to "select -" (cmd_select): the string "-" selects a blank window 2001-04-12 shawn * src/main.c (main): calls XCloseDisplay before exitting after sending a kill, restart, or command message. 2001-04-10 Gergely Nagy * src/main.c (main): initialize command to NULL, silences an annoying warning * debian/rules: sync it up a bit, so it works with both the current CVS ratpoison * debian/ratpoison.examples: new file listing examples installed to /usr/share/doc/ratpoison/examples 2001-04-08 shawn * src/main.c (clean_up): destroys resources stored in screens (init_rat_cursor): frees the pixmaps 2001-04-06 shawn * src/split.h (hide_frame_indicator): new prototype (show_frame_indicator): likewise * src/split.c: include (split_frame): set the new_frame's window to NULL (split_frame): calls show_frame_indicator once the split is done. (set_active_frame): only call show_frame_indicator if the frame has no window or if we switched to a different frame. (update_frame_indicator): prints FRAME_STRING in the frame indicator window. (hide_frame_indicator): new function (show_frame_indicator): likewise * src/main.c (rp_rat_bits): new variable (rp_rat_mask_bits): likewise (alrm_handler): calls hide_frame_indicator (init_rat_cursor): new function (init_screen): calls init_rat_cursor * src/events.c (unmap_notify): calls set_active_frame if the window being unmapped was in the current frame (destroy_window): calls set_active_frame if the window being destroyed was in the current frame (grab_rat): new function (grab_rat): likewise (handle_key): calls grab_rat and ungrab_rat * src/data.h (struct screen_info): new variable rat * src/conf.h (FRAME_INDICATOR_TIMEOUT): new #define (FRAME_STRING): likewise (RAT_HEIGHT): likewise (RAT_WIDTH): likewise (RAT_HOT_X): likewise (RAT_HOT_Y): likewise * src/actions.h (cmd_curframe): new prototype * src/actions.c (initialize_default_keybindings): new key binds for "curframe" (user_commands): new command "curframe" (cmd_curframe): new function * src/split.c (remove_all_splits): only maximize the current window if there is one. (maximize_frame): remove unused code to retrieve the current screen_info. * src/actions.c (cmd_h_split): calls h_split_frame on the current frame. (cmd_v_split): likewise (cmd_only): even if the current frame is empty, call remove_all_splits. * src/split.c (maximize_frame): new function (create_initial_frame): calls maximize_frame to fill in the initial frame's fields. (num_frames): comment out (remove_frame): remove special case when there is only 1 frame left. * src/split.h (h_split_frame): renamed frome h_split_window (v_split_frame): renamed frome v_split_window (split_frame): renamed frome split_window (remove_all_splits): renamed frome remove_all_frames (find_windows_frame): new prototype (find_frame_next): likewise (find_frame_prev): likewise (current_window): likewise (init_frame_list): likewise (set_active_frame): likewise * src/split.c (create_initial_frame): new function (init_frame_list): likewise (find_windows_frame): likewise (find_frame_next): likewise (find_frame_prev): likewise (current_window): likewise (update_frame_indicator): likewise (set_active_frame): likewise (split_frame): rename from split_window (v_split_frame): rename from v_split_window (h_split_frame): rename from h_split_window (remove_all_splits): renamed frome remove_all_frames (total_frame_area): traverses rp_window_frame list (num_frames): likewise (frame_overlaps): likewise (remove_frame): likewise (remove_frame): calls delete_frame_from_list * src/manage.c (scanwins): skips the frame_window (maximize_transient): finds the window's frame (maximize_normal): likewise * src/main.c (main): calls init_frame_list (init_screen): create and map the frame_window * src/list.c (give_window_focus): new function (goto_window): likewise (set_active_window): calls give_window_focus * src/list.h (give_window_focus): new prototype (goto_window): likewise * src/events.c (new_window): the screen's frame_window is not managed (cleanup_frame): new function (unmap_notify): calls cleanup_frame if window exists in a frame (destroy_window): likewise * src/data.h (struct screen_info): remove frame field (struct rp_window_frame): new fields win, prev, next (rp_window_frame_sentinel): new global * src/actions.c (cmd_prev): jumps to last accessed window if current frame is empty. (cmd_next): likewise (cmd_remove): nothing is done if only 1 frame exists * src/data.h (struct screen_info): new field frame_window (rp_current_frame): new global (rp_current_window): removed. All dependant code updated. 2001-04-04 Ryan Yeske * src/actions.c: add :banish to user_commands. (initialize_default_keybindings): Add keybinding for :banish. (cmd_banish): New function. 2001-04-01 shawn * src/manage.c (maximize_normal): fixed maximizing problems for windows with resize hints. (maximize_transient): likewise 2001-03-31 shawn * src/split.h (find_window_for_frame): new function prototype (find_window_for_frame): likewise (find_window_for_frame): likewise (find_window_for_frame): likewise (find_window_for_frame): likewise * src/split.c (window_fits_in_frame): new function (find_window_for_frame): likewise (split_window): likewise (v_split_window): likewise (h_split_window): likewise (remove_all_frames): likewise (frame_is_below): likewise (frame_is_above): likewise (frame_is_left): likewise (frame_is_right): likewise (total_frame_area): likewise (num_frames): likewise (frames_overlap): likewise (frame_overlaps): likewise (remove_frame): likewise * src/ratpoison.h: includes "split.h" * src/manage.c (unmanage): calls free_window (maximize_transient): takes the window's frame into account (maximize_normal): likewise * src/list.h (find_window_prev_with_frame): new function prototype (find_window_next_with_frame): likewise (free_window): likewise * src/list.c (free_window): new function (add_to_window_list): initialize new window's frame to NULL. (find_window_prev): skips windows with frames (find_window_next): likewise (find_window_other): likewise (find_window_prev_with_frame): new function (find_window_next_with_frame): new function (set_active_window): returns if the specified window is already the current window. (set_active_window): If the new window has no frame it inherits the current window's frame. (set_active_window): maximize and raise the newly active window. * src/events.c (unmap_notify): handles window frames. (destroy_window): simplified * src/data.h (struct rp_window_frame): new struct (struct rp_window): add frame variable * src/conf.h (WINDOW_BORDER_WIDTH): set to 1 * src/actions.h (cmd_next_frame): new function prototype (cmd_prev_frame): likewise (cmd_h_split): likewise (cmd_v_split): likewise (cmd_only): likewise (cmd_remove): likewise * src/actions.c (initialize_default_keybindings): new default bindings for "split", "vsplit", "focus", "only", "remove" (user_commands): new user commands "split", "vsplit", "focus", "only", "remove" (cmd_prev_frame): new function (cmd_next_frame): likewise (cmd_h_split): likewise (cmd_v_split): likewise (cmd_only): likewise (cmd_remove): likewise * src/Makefile.am (ratpoison_SOURCES): new files split.c split.h 2001-03-31 Ryan Yeske * doc/ipaq.ratpoisonrc: Use keysym names. 2001-03-28 Shawn * src/main.c (main): initialize rp_command_request and rp_command_result. * src/data.h (rp_command_request): new global (rp_command_result): new global * src/events.c (execute_remote_command): new function (receive_command): loops through the list of command requests calling execute_remote_command on each one. (property_notify): better detection of command requests. * src/communications.c (recieve_command_result): new function (send_command): creates a new window to attach the command to. Waits for confirmation that the command has been executed. * src/actions.h (cmd_echo): new prototype * src/actions.c (cmd_echo): new function (user_commands): update "echo" entry 2001-03-22 Gergely Nagy <8@free.bsd.hu> * debian/control: removed build-dependency on x-terminal-emulator, downgraded xterm | x-terminal-emulator dependency to a recommends only 2001-03-19 shawn * src/main.c (ratpoison_longopts): add --command to recognized command-line options. * src/communications.h (send_command): new function prototype * src/data.h (rp_command): new global variable * src/events.c (receive_command): new function (property_notify): handles rp_command Atoms * src/communications.c (send_command): new function * src/main.c (print_help): prints help for --command (main): handles --command command-line option 2001-03-14 shawn * src/events.c (delegate_event): calls focus_change on FocusOut and FocusIn events. (focus_change): new function * src/list.c (add_to_window_list): add FocusChangeMask to the window's event mask. 2001-03-13 shawn * configure.in: warn the user if the x terminal emulator cannot be found. * src/conf.h: replaced the silly c++ style comment around HIDE_MOUSE with a REAL comment. * src/manage.c (update_window_information): updates the window's border width. * src/conf.h (WINDOW_BORDER_WIDTH): new constant * src/manage.c (maximize_normal): Set the border width to WINDOW_BORDER_WIDTH. takes the border width into account when calculating the position, width, and height. (maximize_transient): likewise (maximize): calls XSetWindowBorderWidth to set the window's border width. (force_maximize): likewise 2001-03-07 shawn * doc/Makefile.am (EXTRA_DIST): Added sample.ratpoisonrc and ipaq.ratpoisonrc 2001-03-07 Ryan Yeske * doc/ipaq.ratpoisonrc: New file. 2001-03-07 Ryan Yeske * src/actions.c (string_to_keysym): New function. (parse_keydesc): Call string_to_keysym. * src/main.c (read_startup_files): Use PRINT_DEBUG to report failure to load rc files. * src/main.c (read_rc_file): Check for comment character '#' in first column. (read_rc_file): Fix typo that was resulting in exhausting virtual memory when parsing rc files. 2001-03-06 shawn * src/input.c (init_modifier_map): rp_modifier_info masks are or'd with existing value. (init_modifier_map): Resolves alt-meta conficts just like emacs. (cook_keycode): returns a KeySym string. Updated Dependant code. (read_key): likewise (get_more_input): copies the KeySym string passed back from read_key into the input buffer. * src/data.h (struct modifier_info): commented out mode_switch_mask. Dependant code commented out. * src/actions.c (cmd_select): the search is not carried out on empty strings. * src/events.c (configure_request): Handles restacking requests. * src/main.c: removed rp_mode_switch and rp_numlock. Added rp_modifier_info global. (main): calls init_modifier_map. (init_screen): windows no longer select on KeyRelease and KeymapState events. * src/input.h (init_modifier_map): new prototype * src/input.c (init_modifier_map): new function (cook_keycode): uses rp_modifier_info to get Mode_switch modifier mask. (read_key): only listens for key presses. * src/events.c (keymap_state): removed function (key_release): likewise (delegate_event): removed case for KeymapNotify. * src/data.h (struct modifier_info): added mode_switch_mask, removed shift_lock_mask. removed rp_mode_switch, and rp_numlock. dependant code updated. 2001-03-05 shawn * configure.in: bumped version to 0.1.1-cvs 2001-03-05 Ryan Yeske * src/actions.c: remove silly C,M,A,S,H #defines and propagate changes. * src/bar.c (update_window_names): Print a '+' for the last accessed window. 2001-03-05 shawn * src/events.c (key_press): set rp_mode_switch to 0 before processing the key. * src/main.c: new globals rp_mode_switch, rp_numlock. (init_screen): selects on KeyRelease events for the root window, input_window, and key_window. (init_screen): selects on KeymapState events for input_window and key_window. * src/input.c (cook_keycode): Handles Mode_switch (aka AltGr). (read_key): listens for KeyRelease and KeymapState events. (read_key): updates rp_mode_switch status * src/events.h (keymap_state): new prototype * src/events.c (keymap_state): new function (key_release): new function (key_press): uses cook_keycode to get the event's keysym. (key_press): updates rp_mode_switch status (delegate_event): handles KeymapNotify events. * src/data.h (struct modifier_info): new struct new globals rp_mode_switch and rp_numlock. 2001-03-04 shawn * configure.in: bumbped version number to 0.1.0 2001-03-04 Gergely Nagy <8@free.bsd.hu> * debian/changelog: bumped version number to 0.1.0 * debian/rules: fixed clean target, it failed when there was no Makefile * doc/ratpoison.1: some indentitation fixes, removed the note that upstream doesn't have a manpage, because it has 2001-03-03 Ryan Yeske * src/actions.c (cmd_bind): Do not pollute the message bar with chatter about the keybinding. 2001-03-03 shawn * src/manage.c (maximize_normal): windows with resize increments resize properly when their original size is > the screen size. (maximize_transient): likewise 2001-03-02 shawn * configure.in: adds -g to CFLAGS when debugging is turned on. * doc/Makefile.am (EXTRA_DIST): man page comes with the distro. * Makefile.am (SUBDIRS): removed man/ * configure.in (AC_OUTPUT): removed man/Makefile removed references to emacs. * doc/Makefile.am (man_MANS): ratpoison.1 moved to doc/ * doc/ratpoison.texi: minor updates. * man/ratpoison.1: added changes from texinfo docs. 2001-03-02 shawn * src/main.c (print_version): updated copyright notice. * src/actions.c (initialize_default_keybindings): removed emacs binding. 2001-03-01 shawn * doc/ratpoison.texi (Commands): filled in remaining commands and keys. 2001-03-01 Ryan Yeske * src/ratpoison.h (xmalloc, xrealloc, fatal): Prototype. * src/main.c (xmalloc): Move here from sbuf.c. (xrealloc): Likewise. (fatal): Likewise. * src/number.c (find_empty_cell): Use xrealloc, remove error check. (init_numbers): Likewise. * src/manage.c (get_window_name): Likewise. * src/main.c (main): Likewise. * src/list.c (add_to_window_list): Likewise. (add_to_window_list): Likewise. * src/events.c (handle_key): Likewise. * src/input.c (keysym_to_string): Likewise. (get_more_input): Use xrealloc, remove error check. * src/actions.c (cmd_source): Open the file. Error report as appropriate. (cmd_windows): Call current_screen() to find the current screen. (cmd_clock): Show the clock even if no windows are open. (cmd_clock): Use xmalloc, remove error check. (initialize_default_keybindings): Use xmalloc. (cmd_bind): Use xmalloc. (cmd_rename): Use xmalloc, remove error check. (add_keybinding): Use xrealloc. (replace_keybinding): Use xrealloc. * src/main.c (read_rc_file): Take a file pointer rather than a filename. (read_startup_files): If ~/.ratpoisonrc is not readable try /etc/ratpoisonrc. * src/actions.c: Use PRINT_DEBUG instead of fprintf. Put useful error text in calls to message(). (cmd_select): Show the window list if there is no such window number. 2001-02-28 shawn * src/manage.c (map_window): calls update_window_information. * src/manage.h (map_window): new prototype. * src/events.c (new_window): calls update_window_information on new windows. (map_request): calls map_window on managed unmapped windows. (configure_request): removed commented out old crusty code. Updates window's structure based on what bits are set in the event's value_mask. Doesn't honour resize request. Windows are always maximized. (property_notify): doesn't call maximize when WM_NORMAL_HINTS are updated. * src/manage.c (manage): no longer maps the window, this code is in map_window. (map_window): new function (maximize): no longer sends a synthetic configure event. (scanwins): calls map_window on viewable windows. (update_window_information): renamed from manage. dependant code updated. 2001-02-27 shawn * doc/ratpoison.texi (Commands): added escape command 2001-02-27 shawn * src/actions.c (cmd_escape): updates the "other" command keybinding * src/manage.h (ungrab_prefix_key): new prototype (grab_prefix_key): likewise * src/manage.c (ungrab_prefix_key): new function * src/main.c (main): calls initialize_default_keybindings after init_window_list. * src/data.h (struct rp_action): key is of type KeySym. state is unsigned int. * src/conf.h (KEY_PREFIX): set to XK_t * src/actions.h (cmd_escape): new prototype * src/actions.c (cmd_escape): new function * src/data.h (struct key): move from actions.h (struct rp_key): rename from struct key. dependant code updated. (prefix_key): new global variable. code dependant on KEY_PREFIX and MODIFIER_PREFIX updated to use this. * src/actions.c: "maximize" user command calls cmd_maximize (initialize_default_keybindings): initializes prefix_key. Added "escape" command. * src/manage.c (force_maximize): moved from actions.c (maximize): likewise (maximize_normal): likewise (maximize_transient): likewise * src/actions.c (cmd_maximize): New function * src/main.c (handler): Prepends error message with "ERROR: ". Displays error in message bar. Returns 0. * src/events.c (destroy_window): sets rp_current_window to NULL when there are no more mapped windows. (destroy_window): calls set_current_window and find_window_other directly instead of cmd_other. 2001-02-26 shawn * src/list.c (save_mouse_position): stores the mouse position relative to the root window. (set_active_window): warps the mouse relative to the root window. * src/actions.h: prototype for force_maximize added * src/actions.c: the user command "maximize" calls force_maximize (force_maximize): New function 2001-02-25 shawn * configure.in (AC_OUTPUT): added man/Makefile * Makefile.am (SUBDIRS): added man dir 2001-02-25 Ryan Yeske * src/main.c (read_rc_file): rename from load_rc_file. Remove static keyword. (read_startup_files): rename from read_initialization_files. * src/actions.c (cmd_prev): Handle situation when there is no other window. (cmd_next): Likewise. (cmd_other): Likewise. (cmd_source): New function. 2001-02-24 Ryan Yeske * src/main.c (load_rc_file): new function (read_initialization_files): new function (main): read the initialization files * src/conf.h: remove themes support * src/themes.h: remove file * src/actions.c (replace_keybinding): add function (cmd_bind): handle binding of previously bound key 2001-02-23 shawn * src/main.c (main): passes return value of find_window_other() to set_active_window(). * src/list.h (remove_from_window_list): removed prototype (find_window_in_list): new prototype (append_to_list): likewise (insert_into_list): likewise (remove_from_list): likewise * src/list.c: propogated use of rp_unmapped_window_sentinel and rp_mapped_window_sentinel. (find_window_in_list): new function (find_window): calls find_window_in_list to search mapped and unmapped window lists. (remove_from_window_list): removed function (init_window_list): initialized sentinels (find_window_prev): searches only the mapped window list. (find_window_next): likewise (find_window_other): likewise (append_to_list): new function (insert_into_list): new function (remove_from_list): new function * src/events.c (unmap_notify): Searches only the mapped window list. moves the window from the unmapped window list to the mapped window list. * src/data.h: removed rp_window_head and rp_window_tail, updated dependant files. Added rp_mapped_window_sentinel and rp_unmapped_window_sentinel globals. * src/bar.c (update_window_names): loops only through mapped window list. 2001-02-21 Ryan Yeske * configure.in: change version to 0.0.6-cvs 2001-02-21 Ryan Yeske * src/manage.c (manage): comment out broken sort_window_list_by_number call * src/actions.h (key): new structure * src/actions.c (find_keybinding): return an rp_action*, not a char* (user_commands): add bind command (parse_keydesc): new function (cmd_bind): new function * src/actions.h: update find_keybinding prototype * src/events.c (handle_key): handle new return value of find_keybinding * src/actions.c (cmd_generate): Send the modifier prefix state as well as the keycode. (find_keybinding): Do not strdup the key action data. (add_keybinding): Strdup the key action data. 2001-02-19 Ryan Yeske * autogen.sh: Run aclocal before autoheader. 2001-02-19 Ryan Yeske * src/events.c (handle_key): Call find_keybinding() instead of looping through keytable here. * src/main.c (main): Call initialize_default_keybindings. * src/actions.c (find_keybinding): Added. (add_keybinding): Added. (initialize_default_keybindings): Added. Do not use static table of keybindings. Instead call add_keybinding() for each key. * src/Makefile.am (ratpoison_SOURCES): add themes.h * src/main.c (FONT_NAME): Rename to FONT (BAR_BG_COLOR): Rename to BACKGROUND (BAR_FG_COLOR): Rename to FOREGROUND * src/list.c (find_window_by_number): Rename to find_window_number. (find_window_by_name): Rename to find_window_name. (goto_window_name): Remove. (find_window_prev): Clean up. (find_window_next): Clean up. * src/list.h: Update prototypes. * src/conf.h: Include "themes.h". * src/actions.c (cmd_generate): Fix typo. (prev_window): Remove. (next_window): Remove. (last_window): Remove. (cmd_prev): Add. (cmd_next): Add. (cmd_other): Add. (string_to_window_number): Add. (cmd_select): Add. (cmd_rename): Add. (delete_window): Remove. (cmd_delete): Add. (cmd_delete): Remove. (cmd_kill): Add. (show_version): Remove. (cmd_version): Add. (command): Remove. (command): Remove. (cmd_colon): Deal with partial input. (cmd_exec): Add. (cmd_newwm): Remove. (cmd_newwm): Add. (cmd_clock): Remove. (cmd_clock): Add. (cmd_clock): Remove. (cmd_windows): Add. (goto_window_number): Remove. (abort_keypress): Remove. (cmd_abort): Add. * src/actions.c: Make :select command handle numbers. (cmd_unimplemented): new function. Commands are all cmd_ prefixed. Major changes within this file. * src/input.c (get_more_input): New function. Used to collect input on top of some existing input. (get_input): Calls get_more_input to do work. * src/conf.h (THEME): added themes support. * src/bar.h (message): New macro. Calls marked_message with (0, 0) highlight parameters. * src/bar.c (marked_message): New function * src/actions.h: Update prototypes. 2001-02-19 shawn * src/manage.c (manage): calls sort_window_list_by_number * src/list.h (sort_window_list_by_number): Added prototype * src/list.c (swap_list_elements): Added (sort_window_list_by_number): Added * src/input.c (update_input_window): Added (get_input): calls update_input_window in place of xlib calls. (get_input): exits if realloc fails * src/conf.h: Added INPUT_WINDOW_SIZE * src/bar.c (update_window_names): loops through window list from head to tail. 2001-02-18 Gergely Nagy <8@free.bsd.hu> * NEWS: mention that ALL of the fixed size buffers are fixed. 2001-02-18 shawn * src/conf.h: restructured comments. Added #define for AUTO_CLOSE. * src/manage.c (unmanage): kills ratpoison when there are no more windows. 2001-02-17 Ryan Yeske * Makefile.am (SUBDIRS): Source dir before documentation dirs. * autogen.sh: Do not continue if a step fails. 2001-02-17 Gergely Nagy <8@free.bsd.hu> * man/ratpoison.1, * doc/ratpoison.texi: removed reference to :center and :resize 2001-02-17 Ryan Yeske * src/actions.c (generate_key_event): Send KEY_PREFIX. 2001-02-17 Ryan Yeske * src/manage.c (current_screen): Rename get_screen() and move to this file. * src/input.c (get_input): Remove screen_info as paramater. Call current_screen() to get screen_info. * src/actions.c (get_screen): Remove. 2001-02-17 Gergely Nagy <8@free.bsd.hu> * src/actions.c (goto_window_by_name, rename_current_window, command) (shell_command, switch_to, xterm_command): changed static char[100]s to dynamic char *s, as get_input() now supports this * src/input.h: reflect get_input change * src/input.c (get_input): use dynamically allocated strings 2001-02-15 Gergely Nagy <8@free.bsd.hu> * autogen.sh: added autoheader call * debian/control: bumped Standards-Version * debian/copyright: changed URL * debian/patches/00list: removed 01-xterm * debian/patches/01-xterm.dpatch: removed, useless with 0.0.6 * debian/rules: rewritten using a newer version of my build system * man/Makefile.am: new file * Makefile.am (SUBDIRS): added man (debian_FILES): new variable, added to EXTRA_DIST * debian/ratpoison.1: moved... * man/ratpoison.1: ...here, and updated to include all the new keystrokes * doc/ratpoison.texi: updated * doc/ratpoison.info: regenerated * configure.in: fixed --enable-debug, added --with-emacs, added man/Makefile to AC_OUTPUT 2001-02-15 Gergely Nagy <8@free.bsd.hu> * src/getopt.c: fixed a warning * src/events.c (handle_key): use dynamically allocated strings * src/bar.c (display_msg_in_bar), * src/sbuf.c (xrealloc): changed an fprintf to PRINT_DEBUG 2001-02-15 Ryan Yeske * src/list.c (save_mouse_position): changed declaration of mask to unsigned int (get_mouse_root_position): changed declaration of mask to unsigned int * src/actions.c (xterm_command): added new function. Thanks to Ben Leslie (user_commands): added "xterm" (key_actions): added C-t C-! binding for "xterm" * src/messages.h (MESSAGE_PROMPT_XTERM_COMMAND): new message 2001-02-14 Ryan Yeske * src/actions.h (generate_key_event): added prototype * src/actions.c (key_actions): added additional keybindings to include C- versions for all keys. (generate_key_event): added command 2001-02-13 Ryan Yeske * src/bar.c (update_window_names): get indexes around current window text to pass to display_msg_in_bar (display_msg_in_bar): xor a rectangle around the text represented by mark_start and mark_end arguments * src/conf.h (BAR_FG_COLOR): changed to black (BAR_BG_COLOR): changed to white (FONT_NAME): changed to 9x15bold (BAR_Y_PADDING): changed to zero (BAR_X_PADDING): changed to zero * src/data.h (struct screen_info): removed bold_gc * src/events.c (handle_key): can no longer over modify keystrokes (handle_key): updated call to display_msg_in_bar to take extra highlighting parameters. * src/main.c (init_screen): removed bold_color (XGCValues gv): made global * src/actions.h (user_command): new struct (argtype): new enumeration * src/actions.h: many updated prototypes * src/actions.c (key_actions): every command is now executed by calling command() with a string version of the command, rewrote this table to reflect that. (user_commands): new symbol table added, a mapping between strings and functions and arguments. (spawn): now handles commands with arguments by calling them through "/bin/sh -c" (get_screen): new function. * src/actions.c: all calls to display_msg_in_bar updated to call with 2 additional highlight parameters. * src/actions.c (goto_win_by_name, rename_current_window, ...): most all user functions that need arguments will prompt the user for them, unless they are supplied. Allows the same function to be used interactively or internally. * src/bar.h (display_msg_in_bar): updated prototype * src/bar.c (display_msg_in_bar): takes two additional int arguments which are offsets into the string describing which part of the text to draw highlighted. (update_window_names): highlight current window 2001-02-12 Ryan Yeske * src/actions.c (spawn): will now execute commands with arguments by execl'ing through /bin/sh -c 2001-02-11 Ryan Yeske * autogen.sh: added to repository 2001-02-11 Ryan Yeske * src/ratpoison.h: #include "sbuf.h" removed duplicate #include "messages.h" * src/Makefile.am (ratpoison_SOURCES): added sbuf.c sbuf.h * src/bar.c (calc_bar_width): removed function (update_window_names): now builds up the entire window list string in dynamic storage before printing the window list. No longer displays the current window in a different colour. 2001-02-11 shawn * src/main.c (set_sig_handler): Added (main): Uses set_sig_handler() instead of signal() * src/manage.h (set_state): Added prototype * src/manage.c (send_configure): Now sends the window's x,y,width,height coordinates. (set_state): Added * src/events.c (map_request): Calls set_state when mapping an unmapped window. * src/actions.c (maximize_transient): takes an rp_window as the argument. Removed code to handle void *data. Incremental resizing only happens if the maximum size isn't set. Removed actual X maximization code. (maximize): Moved meat to maximize_normal(). 2001-02-10 Ryan Yeske * src/ratpoison.h: #include "messages.h" * src/list.h (goto_window_number): moved prototype to actions.h * src/actions.h (goto_window_number): added prototype (goto_window): removed prototype * src/Makefile.am (ratpoison_SOURCES): added messages.h * src/actions.c (prev_window): display correct message when there is no other window or there are no windows at all. (next_window): display correct message when there is no other window or there are no windows at all. (key_actions): all number keys call goto_window_number with an argument instead of a dedicated function. (key_actions): XK_exclam now runs execute_command * src/actions.c: replaced all user message strings with #define'd messages. * src/actions.h (goto_window): removed (goto_window_0): removed (goto_window_1): removed (goto_window_2): removed (goto_window_3): removed (goto_window_4): removed (goto_window_5): removed (goto_window_6): removed (goto_window_7): removed (goto_window_8): removed 2001-02-10 shawn * src/communications.c (send_restart, send_kill): Added * src/ratpoison.h: includes communications.h * src/main.c (send_restart, send_kill): Moved to communications.c * src/list.c (get_mouse_root_position): Added (add_to_window_list): Initialize new rp_window fields (save_mouse_position): Added (set_active_window): Added code to save and restore the position of the mouse * src/events.c (property_notify): Added code to listen for a WM_TRANSIENT_FOR property change. * src/data.h (struct rp_window): Added transient, transient_for, mouse_x, mouse_y. * src/actions.c (maximize_transient): Added (maximize): Added code to handle transient windows differently * src/Makefile.am (ratpoison_SOURCES): Added communications.h and communications.c 2001-02-04 Ryan Yeske * doc/ratpoison.texi: added keystroke for `Show current time.' * debian/ratpoison.1: added keystroke for `Show current time.' 2001-01-02 shawn * src/communications.c (send_restart): moved from main.c (send_kill): moved from main.c * src/main.c: Removed send_kill, send_restart * src/input.h: Added copyright notice. * src/input.c: Added copyright notice. * src/actions.c: Added copyright notice. 2001-02-04 Ryan Yeske * src/actions.c (prev_window): do not set active window when recursing. (next_window): do not set active window when recursing. 2001-01-28 Ryan Yeske * src/actions.c: changed rename_current_window key to `A', bound `a' to show_clock 2001-01-02 shawn * src/actions.h (show_clock): added prototype * src/actions.c (show_clock): added 2000-12-15 shawn * src/actions.c (maximize): increment size in hints->width_inc and hints->height_inc intervals * src/manage.c (manage): set the dimension members of the rp_window struct 2000-12-15 shawn * src/manage.c (manage): added ColormapChangeMask and StructureNotifyMask to events listened for on managed windows. * src/main.c (main): propagated changes to set_active_window usage * src/events.c: propagated changes to set_active_window usage * src/data.h (struct rp_window): Added colormap member * src/list.c (set_active_window): Installs colormap (set_active_window): sets rp_current_window to window passed in as parameter * src/actions.c (prev_window): No longer uses rp_current_window to keep track of state (next_window): No longer uses rp_current_window to keep track of state * src/list.c (add_to_window_list): sets member colormap to the DefaultColormap * src/manage.c (update_window_name): fixed memory leak. Not freeing the win->name before updating it. (manage): Gets the colormap now. * src/list.c (add_to_window_list): Added init code for `hints' * src/events.c (property_notify): Added handler for XA_WM_NORMAL_HINTS. * src/data.h (struct rp_window): Added XSizeHints member * src/actions.c (maximize): Adhere to the window's Size Hints 2000-12-14 shawn * src/manage.h (update_normal_hints): added prototype * src/manage.c (update_normal_hints): added * src/list.c (add_to_window_list): added comment describing function 2000-12-13 shawn * src/actions.c: removed gross tabs from key_actions definition. Add C-t space to go to next window. 2000-12-09 shawn * src/data.h (struct rp_window): added x, y, width, height, border; * src/events.c (configure_request): Now honours request, but then maximizes it afterwards. (configure_request): updates the rp_window's geometry fields * src/manage.c (manage): commented out XMoveResizeWindow call (send_configure): added * src/actions.h (maximize): added prototype * src/actions.c (maximize): added * src/input.c (cook_keycode): properly handle LockMask (cook_keycode): updated comments * src/input.h: added prototype for keysym_to_string * src/input.c (keysym_to_string): added * src/bar.c (show_bar): update_window_names(s) is called whether the bar is raised or not. * src/conf.h: Added BAR_Y_PADDING BAR_X_PADDING * src/list.c (goto_window_name): return success or failure * src/list.h: updated prototype for goto_window_name * src/events.c (handle_key): Added a message indicating an unbound key. * src/bar.c (display_msg_in_bar): added (update_window_names): uses BAR_X_PADDING instead of `5' (update_window_names): Updated BAR_PADDING to BAR_Y_PADDING * src/input.c (cook_keycode): mod is now an usigned int (read_key): Ignores modifier keys. Now returns keysym and modifiers. (get_input): Updated BAR_PADDING to BAR_Y_PADDING and BAR_X_PADDING. * src/events.c (handle_key): uses read_key instead of XMaskEvent to read a key. * src/actions.c (goto_window_number): window list is displayed on failure. (bye): added (switch_to): added (execute_command): no longer seg faults when no windows exist. 2000-12-03 shawn * src/input.h (cook_keycode): added prototype * src/actions.c: key_actions now uses the #define'd keysyms from X11/keysym.h * src/events.c (handle_key): calls cook_keycode() before processing the keysym. * src/input.c (read_key): calls cook_keycode() before returning the keysym (cook_keycode): added. 2000-12-01 shawn * src/list.c (find_window_by_name): added check to make sure the window's state is not STATE_UNMAPPED. 2000-11-27 shawn * src/events.c (handle_key): Code to generate the prefix event has been moved to generate_prefix(). * src/actions.h (toggle_bar): added prefixes for generate_prefix, and abort_keypress. * src/actions.c (generate_prefix): added. (abort_keypress): added. 2000-11-04 Ryan Yeske * src/Makefile.am (ratpoison_SOURCES): added getopt.c, getopt1.c and getopt.h 2000-10-30 Ryan Yeske * src/actions.h (execute_command): added prototype * src/actions.c (rename_current_window): added test to skip renaming if user entered an empty string (execute_command): added command (key_actions): execute_command is called by pressing ':' 2000-10-30 shawn * src/conf.h: added HIDE_MOUSE 2000-10-24 Ryan Yeske * src/bar.c (bar_x): rightmost border is no longer off screen 2000-10-20 shawn * src/events.c (key_press): fixed MODIFIER_PREFIX bug 2000-10-19 Ryan yeske * src/manage.c (unmanaged_window): added. * src/conf.h (PADDING_LEFT, PADDING_TOP, PADDING_RIGHT, PADDING_BOTTOM, UNMANAGED_WINDOW_LIST): added. Windows listed in UNMANAGED_WINDOW_LIST will not be managed. Space reserved for unmanaged windows can be defined with PADDING_* 2000-10-19 shawn * src/manage.c (get_window_name): added 2000-10-17 shawn * src/events.c (configure_request): resize windows to the max-1. Call XConfigureWindow as well as XSendEvent. * src/manage.c (scanwins): Now only maps visible windows * src/conf.h: Removed keystroke related defines * src/actions.c: Moved all key activated functions here. Added key_actions array. * src/events.c (unmap_notify): now properly unmaps windows * src/data.h: added ignore_badwindow * src/main.c (handler): added ability to ignore BadWindow errors 2000-10-15 shawn * src/main.c, src/data.h, src/events.c: Added ability to kill and hup running ratpoison processes.