summaryrefslogtreecommitdiff
path: root/src/ratpoison.h
AgeCommit message (Collapse)Author
2017-09-17Move fatal() and x* helpers to their own fileJérémie Courrèges-Anglas
Should help use them from within tests.
2017-09-17Move utf8_locale to its own fileJérémie Courrèges-Anglas
So that we can easily use it from tests.
2017-08-28Move several functions out of main.c into globals.cWill Storey
These functions are used in many parts of ratpoison. In order to compile a separate program using the ratpoison files, we need them available outside of main.c.
2017-03-10Use file names, not paths, in error/warning/debug messagesJérémie Courrèges-Anglas
2017-03-10Print a warning if a deprecated command is used.Jérémie Courrèges-Anglas
2017-02-15Merge branch 'xrandr'Jérémie Courrèges-Anglas
All the hard work on xrandr done by Mathieu OTHACEHE, thanks!
2016-12-08Move function declaration to the right headerMathieu OTHACEHE
find_screen is defined in screen.c so it makes more sense to declare it in screen.h
2016-11-23Kill unused declJérémie Courrèges-Anglas
2016-11-17Add xrandr supportMathieu OTHACEHE
Drop deprecated xinerama support and replace it with xrandr. Signed-off-by: Mathieu OTHACEHE <m.othacehe@gmail.com>
2014-03-04get_homedir(), checks HOME and the password databaseJérémie Courrèges-Anglas
* ensures that the resulting home directory isn't the empty string (else returns NULL)
2014-02-20Change set_close_on_exec to take a file descriptor.Jérémie Courrèges-Anglas
* Since it's easier to get a fd from a FILE * rather than the other way around.
2014-01-03In str_comp() make len and i size_t.Jérémie Courrèges-Anglas
2014-01-03Remove some fairly obvious comments.Jérémie Courrèges-Anglas
2014-01-03FD_CLOEXEC is only used in set_close_on_exec().Jérémie Courrèges-Anglas
2014-01-03We need config.h, no need for ifdef's.Jérémie Courrèges-Anglas
2009-07-15silence gcc warnings against empty if branchesBernhard R. Link
2008-10-22define different history types and use themBernhard R. Link
(implementation does not separate them yet, though)
2008-06-22make xstrdup argument const char*Bernhard R. Link
2006-09-27*** empty log message ***sabetts
2006-05-24* src/xinerama.c (free_xinerama): take void arguments. prototype updated.sabetts
(init_xinerama): likewise * src/window.c (init_window_stuff): take void arguments. prototype updated. (free_window_stuff): likewise * src/split.c (remove_all_splits): take void arguments. prototype updated. (current_frame): likewise (init_frame_lists): likewise (find_last_frame): likewise (current_window): likewise (remove_all_splits): likewise (hide_frame_indicator): likewise (show_frame_indicator): likewise * src/main.c (check_child_procs): take void arguments. prototype updated. (clean_up): likewise * src/number.c (numset_new): take void arguments. prototype updated. * src/manage.c (clear_unmanaged_list): take void arguments. prototype updated. (list_unmanaged_windows): likewise (ungrab_keys_all_wins): likewise (grab_keys_all_wins): likewise (current_screen): likewise (unhide_all_windows): likewise * src/main.c (sighandler): static function (hup_handler): likewise (alrm_handler): likewise (handler): likewise (print_version): likewise (print_help): likewise (show_welcome_message): take void arguments (init_defaults): likewise * src/input.c (ring_bell): take void arguments. prototype updated (update_modifier_map): likewise * src/history.c (get_history_filename): take void arguments (history_load): take void arguments. prototype updated (history_save): likewise (history_reset): likewise (history_previous): likewise (history_next): likewise (history_list_items): likewise * src/group.c (group_in_list): static function (init_groups): take void arguments. prototype updated (free_groups): likewise (group_next_group): likewise (group_prev_group): likewise * src/globals.c (x_export_selection): take void arguments (get_cut_buffer): likewise (get_primary_selection): likewise (get_selection): take void arguments. protype updated. (init_globals): likewise * src/events.c (selection_clear): take void arguments (handle_signals): likewise (listen_for_events): take void argumens. prototype updated * src/bar.c (reset_alarm): take void arguments (show_last_message): take void arguments. prototype updated. (free_bar): likewise * src/actions.c (init_set_vars): static function. take void arguments (clear_frame_redos): take void arguments (pop_frame_undo): likewise (pop_frame_redo): likewise (keymap_new): static function (parse_keydesc): likewise (trivial_completions): likewise (keymap_completions): likewise (window_completions): likewise (group_completions): likewise (colon_completions): likewise (exec_completions): likewise (hook_completions): likewise (var_completions): likewise (update_all_gcs): take void arguments (grab_rat): likewise (ungrab_rat): likewise (init_user_commands): take void arguments. prototype updated. (free_keymaps): likewise (free_aliases): likewise
2006-04-20* src/split.c (show_frame_message): use XmbDrawString and XmbTextEscapementsabetts
* src/screen.c (init_screen): don't include the font in the gc * src/ratpoison.h: include Xlocale.h * src/manage.c (get_wmname): support i18n characters * src/main.c (init_defaults): call load_query_font_set and set_extents_of_fontset (main): call setlocale (clean_up): call XFreeFontSet (set_extents_of_fontset): new function (load_query_font_set): likewise * src/input.c (update_input_window): use XmbTextEscapement and XmbDrawString * src/globals.h (FONT_HEIGHT): use rp_font_ascent and rp_font_descent (MAX_FONT_WIDTH): use rp_font_width new globals rp_font_ascent, rp_font_descent, rp_font_width * src/globals.c: new globals rp_font_ascent, rp_font_descent, rp_font_width * src/data.h (struct rp_defaults): font is a XFontSet * src/bar.c (max_line_length): call XmbTextEscapement (draw_string): call XmbDrawString (get_mark_box): call XmbTextEscapement * src/actions.c (read_frame): call XmbTextEscapement (cmd_license): likewise (read_frame): call XmbDrawString (cmd_license): likewise (cmd_help): likewise (update_gc): don't include the font (set_font): call load_query_font_set
2006-03-16remove tabs and trailing whitespace.sabetts
2006-03-15(init_user_commands): add optional argument to "info"sabetts
(cmd_info): handle optional argument * 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
2005-03-05* src/ratpoison.h (check_child_procs): new prototypesabetts
(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.
2004-12-13* src/sbuf.c (sbuf_concat): call sbuf_nconcat. move bulk of bodysabetts
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-04update copyright.sabetts
2004-12-02Updated copyright notices.sabetts
2004-09-29* configure.in: Warn when the history header or library is notsabetts
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-02-27* src/window.c (give_window_focus): save the mouse position beforesabetts
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
2003-11-18* contrib/rpshowall.sh: store ratpoison binary location insabetts
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-03 * configure.in: Add "--disable-history" handling.sabetts
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-07-17* src/window.c (set_active_window): run the switch window hook.sabetts
* 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-05-27* src/editor.c (saved_command): new local globalsabetts
(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* src/window.c: do not include ctype.hsabetts
* 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
2003-05-16* src/window.c (add_to_window_list): add the window to the currentsabetts
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(struct rp_screen): rename fromsabetts
screen_info. Dependant code updated.
2003-03-31* src/split.c (current_window): call screen_get_frame.sabetts
(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-07* src/Makefile.am (ratpoison_SOURCES): add frame.c and frame.hsabetts
* 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-07* src/Makefile.am (ratpoison_SOURCES): remove list.h and list.c,sabetts
add window.c and window.h * src/ratpoison.h: include window.h instead of list.h
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
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.
2001-12-21* src/sbuf.h (sbuf_printf_concat): new prototypesabetts
(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.
2001-09-18* src/ratpoison.h (xstrdup): new prototypesabetts
* src/main.c (xstrdup): new function. All calls to strdup replaced with calls to xstrdup. (main): Keep a list of all commands pasted in through the -c command-line option. (main): execute all commands pasted in through the -c command-line option. * src/actions.h (cmd_chdir): new prototype * src/actions.c (cmd_clock): rename to cmd_time. Dependant code updated. (user_commands): rename "clock" command to "time". (cmd_chdir): new function (user_commands): new command "chdir".
2001-04-01* src/split.h (find_window_for_frame): new function prototypesabetts
(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-02* ratpoison.h (xmalloc, xrealloc, fatal): Prototype.rcyeske
* main.c (xmalloc): Move here from sbuf.c. (xrealloc): Likewise. (fatal): Likewise. * number.c (find_empty_cell): Use xrealloc, remove error check. (init_numbers): Likewise. * manage.c (get_window_name): Likewise. * main.c (main): Likewise. * list.c (add_to_window_list): Likewise. (add_to_window_list): Likewise. * events.c (handle_key): Likewise. * input.c (keysym_to_string): Likewise. (get_more_input): Use xrealloc, remove error check. * main.c (read_rc_file): Take a file pointer rather than a filename. (read_startup_files): If ~/.ratpoisonrc is not readable try /etc/ratpoisonrc.
2001-03-02* actions.c (cmd_source): Open the file. Error report asrcyeske
appropriate. * main.c (read_rc_file): Take a file pointer rather than a filename. (read_startup_files): If ~/.ratpoisonrc is not readable try /etc/ratpoisonrc. * 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-26added cmd_sourcercyeske
2001-02-15header cleanups & copyright year update & coalgernon
2001-02-14rewrote bar highlightingrcyeske
2001-02-12#include "sbuf.h"rcyeske
removed duplicate #include "messages.h"