summaryrefslogtreecommitdiff
path: root/src/actions.c
AgeCommit message (Collapse)Author
2003-02-27* src/main.c (free_screen): new functionsabetts
(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* src/split.h (cleanup_frame): new protoypesabetts
* 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-23* configure.in: don't check for variable argument support insabetts
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/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/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-22* src/actions.c (cmd_number): use list delete entry macrosabetts
(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* src/split.h (num_frames): new prototypesabetts
(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-02-10 * src/actions.c (cmd_bind): more informative error messagessabetts
(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-26(cmd_rudeness): rudeness data correctly stored in rudenesssabetts
variables.
2003-01-26(cmd_defwaitcursor): error message correctly shows what commandsabetts
the error occurred in.
2003-01-26(cmd_help): Print key binding when calledsabetts
non-interactively.
2002-12-11* configure.in (AC_CHECK_FUNCS): Add check for putenv, removesabetts
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-10(spawn): only add DISPLAY to the environment if itsabetts
isn't already there.
2002-11-24* src/main.c: include sys/wait.hsabetts
(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* src/ratpoison.h[!HAVE_VARARG_MACROS]: PRINT_ERROR andsabetts
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.
2002-11-20* src/main.c (init_defaults): set pointer warping to on bysabetts
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* src/actions.c (read_split): a negative number means subtract thesabetts
pixels from the frame's current size to get the new frame's size.
2002-10-18* src/split.c (VERTICALLY): new definesabetts
(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(cmd_bind): malloc the correct amount of memory for keydescsabetts
(cmd_unbind): likewise
2002-07-06(cmd_help): key descriptions don't run off thesabetts
bottom of the screen.
2002-04-25Ouch. Somehow this got corrupted :(algernon
2002-04-252002-04-25 Gergely Nagy <algernon@debian.org>algernon
* 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-24* src/actions.c (command): look for the command in the aliasessabetts
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-03-13* src/actions.c (cmd_nextscreen): An error message is displayedsabetts
when there is only 1 screen. (cmd_prevscreen): likewise
2002-03-13* src/split.c (set_active_frame): fix to operate properly withsabetts
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-14(cmd_license): redraw the bar if it was visible.sabetts
(cmd_help): likewise
2002-02-08* src/split.h (find_last_frame): prototype now correctly reflectssabetts
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-03(cmd_defbarpadding): print an error message ifsabetts
defbarpadding is called interactively without arguments.
2002-02-01* src/actions.c (command): bail out if alias recursion gets too deep.sabetts
* 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(alias_t): rename data structure from cmd_alias tosabetts
avoid a name clash with the function cmd_alias. Dependant code updated.
2002-01-24* src/actions.c (cmd_defbgcolor): don't set the background color for key_window.sabetts
(cmd_deffgcolor): don't set the foreground color for key_window.
2002-01-24* src/actions.c (cmd_defbarloc): Read the location argument as asabetts
gravity argument using parse_wingravity.
2002-01-24* src/messages.h (MESSAGE_FRAME_STRING): Pad the string withsabetts
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.
2002-01-24* src/actions.c (command): Append to the end of alias command thesabetts
arguments passed in before evaluating the alias.
2002-01-24* src/actions.c (find_alias_index): new functionsabetts
(cmd_alias): When an alias is already in the alias list, replace it with the new alias. * src/events.c (configure_request): do not send a synthetic configure notify event.
2002-01-24(wingravity_to_string): Fix the north gravitysabetts
string to return "n" not "ng".
2002-01-24(wingravity_to_string): Fix the north gravitysabetts
string to return "n" not "ng".
2002-01-10* src/events.c (delegate_event): ignore the CirculateRequest event.sabetts
* 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-08(setenv, unsetenv): new functions, used when the system libc does not have them.algernon
2001-12-21* src/actions.h (cmd_alias): new prototypesabetts
* 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
2001-12-21* src/actions.c (user_commands): remove "license" from thesabetts
unimplemented section.
2001-12-21* src/actions.h (cmd_license): new prototypesabetts
* src/actions.c (cmd_license): new function (user_commands): new command "license" (initialize_default_keybindings): bind "license" to V and C-V
2001-12-21* src/manage.c (unmanage): set the kill_signalled variable.sabetts
* 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
2001-12-21added a note about the contributorsabetts
2001-12-21* src/input.c (update_input_window): Draw the cursor in the right place.sabetts
* src/actions.h (cmd_defbarpadding): new prototype * src/actions.c (user_commands): new command entry "defbarpadding" (cmd_defbarpadding): new function
2001-12-20* src/manage.c (maximize_transient): always honour the currentsabetts
size of the window. * src/actions.c (cmd_info): print "Transient" if the window is a transient window.
2001-12-12(parse_keydesc): Don't mangle the key descriptionsabetts
argument.
2001-12-09* src/events.c (handle_key): revert the focus immediately aftersabetts
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-05(cmd_getenv): New function.rcyeske
2001-10-18* src/split.c (show_frame_indicator): call XSync after clearing the window.sabetts
* 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
2001-10-18* src/split.h (find_last_frame): new prototypesabetts
* 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"
2001-09-23(initialize_default_keybindings): Change C-t a andsabetts
C-t C-a binding to "time".