Age | Commit message (Collapse) | Author |
|
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
|
|
* src/split.c (set_active_frame): use set_window_focus.
(blank_frame): likewise
* src/main.c (main): use set_window_focus.
* src/input.c (get_more_input): use set_window_focus
* src/globals.h (set_window_focus): new prototype
(set_rp_window_focus): likewise
* src/events.c (handle_key): use set_window_focus.
* src/actions.c (cmd_resize): use set_window_focus.
(cmd_license): likewise
(cmd_help): likewise
(cmd_tmpwm): likewise
(cmd_fselect): likewise
* src/globals.c (set_rp_window_focus): new function
(set_window_focus): likewise
|
|
already the current window.
(set_active_window): don't abort if last_win and win are the same.
|
|
window is already the focused window.
|
|
when win and last_win aren't the same window.
|
|
* 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
|
|
unhide_window, it is made in give_window_focus. Call
give_window_focus before calling hide_others.
|
|
* 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
|
|
(show_bar): call reset_alarm()
(count_lines): make function static. clean up code.
(max_line_length): likewise
(pos_in_line): likewise
(line_beginning): likewise
(draw_string): new static function
(correct_mark): likewise
(prepare_bar): likewise
(get_mark_box): likewise
(draw_inverse_box): likewise
(draw_mark): likewise
(update_last_message): likewise
(marked_message): Move most of the code to seperate function
calls. Call reset_alarm(), prepare_bar(), draw_string(),
correct_mark(), draw_mark(), and update_last_message().
* src/actions.c (cmd_select): fix crash bug.
* src/window.c (get_window_list): mark_end is the length of the
string. Don't do a special case if the window list is being
displayed as a column.
|
|
* src/window.c (find_window): add debugging output describing
which window list the window was found in.
* src/group.c (group_new): assign the group's number the number
passed as an argument.
* src/events.c (destroy_window): withdraw iconified and normal
windows before unmanaging them.
(handle_signals): delete the node from the list before freeing it.
* src/bar.h (message): remove define.
(marked_wrapped_message): remove prototype
(message): new prototype
* src/bar.c (message): new function
(marked_wrapped_message): renamed to marked_message. remove
marked_message.
|
|
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
|
|
dependant code updated.
* src/main.c: remove child_info global. Add rp_children global.
(chld_handler): update the terminated and status fields of any
terminated children.
* src/events.c (handle_signals): loop through each child process
and remove them from the list. Print a message for any child that
doesn't return a 0 status.
* src/data.h (rp_child_info): new fields, terminated and node.
remove child_info global. Add rp_children global.
* src/actions.c (spawn): Add the command to the list of children.
|
|
screen_info. Dependant code updated.
|
|
(list_unmanaged_windows): likewise
(add_unmanaged_window): likewise
* src/manage.c (unmanaged_window_list): no longer a const.
(num_unmanaged_windows): new static global
(clear_unmanaged_list): new function
(list_unmanaged_windows): likewise
(add_unmanaged_window): likewise
(unmanaged_window): use num_unmanaged_windows to tell how many
elements are in the unmanaged list.
* src/actions.h (cmd_unmanage): new prototype
(cmd_clrunmanaged): likewise
* src/actions.c (user_commands): new commands unmanage,
clrunmanaged.
(cmd_unmanage): new function
(cmd_clrunmanaged): likewise
* src/bar.c (BAR_IS_HIDDEN): new define.
(update_bar): new function.
* src/actions.c (cmd_frestore): call update_bar() instead of
update_window_names().
* src/actions.c (cmd_frestore): update the window list after
restoring the frames.
|
|
defaults.win_name values.
(window_name): remove case WIN_NAME_TITLE and glob it with the
default switch.
* src/main.c (init_defaults): use WIN_NAME_* defines for
possible defaults.win_name values.
* src/actions.c (cmd_defwinname): use WIN_NAME_* defines for
possible defaults.win_name values.
(cmd_defwinname): likewise
* src/data.h (WIN_NAME_TITLE): new define
(WIN_NAME_RES_CLASS): new define
(WIN_NAME_RES_NAME): new define
* src/window.c (add_to_window_list): use xstrdup to create the
default value for user_name.
|
|
the end of the mark is the length of the buffer minus the start of
the mark.
* src/main.c (init_defaults): init window_list_style to STYLE_ROW.
* src/data.h (struct rp_defaults): new member, window_list_style.
* src/bar.c (bar_y): new argument, height. All callers updated.
(bar_y): use height in calculations.
(update_window_names): print a column of windows if
defaults.window_list_style is in column mode.
(count_lines): new function
(max_line_length): likewise
(pos_in_line): likewise
(line_beginning): likewise
(marked_wrapped_message): likewise
* src/actions.c (user_commands): new commands 'verbexec' and
'defwinliststyle'. Move @end take to after the def* commands.
(cmd_verbexec): new function. Added prototype.
(cmd_defwinliststyle): likewise
|
|
the end of the mark is the length of the buffer minus the start of
the mark.
* src/main.c (init_defaults): init wrap_window_list to 0.
* src/input.c (update_input_window): store the height in a
variable.
* src/data.h (struct rp_defaults): new member, wrap_window_list.
* src/bar.h [message]: wrap msg arg in parens.
(marked_wrapped_message): new prototype
* src/bar.c (bar_y): new argument, height. All callers updated.
(bar_y): use height in calculations.
(update_window_names): print a column of windows if
defaults.wrap_window_list is on.
(count_lines): new function
(max_line_length): likewise
(pos_in_line): likewise
(line_beginning): likewise
(marked_wrapped_message): likewise
* src/actions.c (user_commands): new commands 'verbexec' and
'defwrapwinlist'. Move @end take to after the def* commands.
(cmd_verbexec): new function. Added prototype.
(cmd_defwrapwinlist): likewise
|
|
and value using strtok.
* src/window.c (add_to_window_list): init the window's frame_number to EMPTY.
* src/number.h (numset_clear): new prototype
* src/manage.c (unmanage)[AUTO_CLOSE]: code update for new globals.
* src/frame.c (frame_new): init f->last_access to 0.
(frame_dump): dump the X11 window ID, not the window number.
(frame_read): new function
* src/events.c (destroy_window): just unmanage the window.
* src/actions.h (cmd_fdump): new prototype
(cmd_frestore): likewise
* src/actions.c (user_commands): new commands "fdump" and "frestore".
(cmd_fdump): new function
(cmd_frestore): likewise
* src/number.c (numset_clear): new function.
|
|
* src/split.h (current_frame): new prototype
* src/split.c (current_frame): new function
(current_window): use current_frame()
(split_frame): likewise
(remove_all_splits): likewise
(set_active_frame): likewise
(show_frame_message): likewise
(remove_all_splits): use current_screen()
* src/actions.c (cmd_prev_frame): use current_frame()
(cmd_next_frame): likewise
(cmd_select): likewise
(cmd_h_split): likewise
(cmd_v_split): likewise
(cmd_remove): likewise
(cmd_shrink): likewise
(cmd_resize): likewise
(cmd_focusup): likewise
(cmd_focusdown): likewise
(cmd_focusleft): likewise
(cmd_focusright): likewise
|
|
(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
|
|
|