summaryrefslogtreecommitdiff
path: root/src/frame.c
AgeCommit message (Collapse)Author
2017-09-18Delete more unused codeJérémie Courrèges-Anglas
2016-12-12Update screen-aware focus* commands after changes to support XRandRJoseph Mingrone
This is an update to Pedro Silva's patch, so that it applies against the xrandr branch. That patch introduced four new functions, frame_*_abs, which report a frame's left, right, top, and bottom coordinates offset by it's screen arrangement. This allows the use of the focus* commands as additional screen navigation tools, and has the added benefit of making the find_frame_* functions clearer.
2009-07-15do not shadow identifiers (silencing gcc's -Wshadow warnings)Bernhard R. Link
2007-01-31* src/frame.c (frame_read): fix bug to never set dedicatedbrl
2006-09-27*** empty log message ***sabetts
2006-03-162006-03-15 Bernhard R. Link <brlink@debian.org>sabetts
* src/screen.c (screen_update): new function (init_screen): listen for screen resizes * src/screen.h: new prototype * src/events.c (configure_notify): new function (delegate_event): call configure_notify for ConfigureNotify events * src/frame.c (frame_dump): remember the size of the screen the frame coordinates are relative to. (frame_restore): adopt coordinates to possible screen resizes. * src/frame.h (frame_fump): take a screen argument (frame_read): likewise * src/actions.c (cmd_tmpwm): listen for screen resizes again (fdump, frestore, cmd_fdump): supply screen to frame_dump, frameread
2006-03-16* src/window.c (_XOPEN_SOURCE): new definesabetts
* src/screen.c (is_a_root_window): w is unsigned int (init_screen): typecast _net_wm_pid as unsigned char*. * src/main.c (read_rc_file): linesize is size_t * src/frame.c (frame_read): use a temp var when reading the :dedicated value. * src/bar.c (max_line_length): i and start are size_t (draw_string): i is size_t (get_mark_box): mark_start and mark_end are size_t * src/actions.c (find_keybinding): state is unsigned int (remove_keybinding): likewise (frame_selector): n is unsigned int (frame_selector_match): i is size_t. typecast comparison as size_t.
2006-03-16remove tabs and trailing whitespace.sabetts
2005-01-17(frame_read): remove space in "(frame " string.sabetts
2005-01-15(frame_read): correctly determine if the inputsabetts
starts with "(frame ".
2004-12-04use a hyphen instead of underscore for f->last_access.sabetts
2004-12-04update copyright.sabetts
2004-12-02Updated copyright notices.sabetts
2004-11-19(init_frame): new static functionsabetts
(frame_new): call init_frame (frame_read): likewise
2004-11-19(frame_dump): dump the frame as an sexpr instead ofsabetts
a list of numbers. (frame_read): read the new frame dump format
2004-11-19* src/actions.c (set_vars): add maxundossabetts
(push_frame_undo): new function (pop_frame_undo): likewise (initialize_default_keybindings): add binding for "undo" (initialize_default_keybindings): add def alias for maxundos (cmd_other): call set_active_window_force instead of set_active_window (cmd_v_split): push the frame set (cmd_h_split): likewise (cmd_only): likewise (cmd_remove): likewise (cmd_shrink): likewise (cmd_tmpwm): likewise (cmd_license): update copyright. Add build date and time. (cmd_fselect): simplify code that returns the frame selected. (fdump): new function (cmd_fdump): call fdump to dump the screen's frame set. (frestore): new function (cmd_frestore): call frestore to restore the screen's frame set. (cmd_sfdump): new function (cmd_sdump): likewise (set_maxundos): likewise (cmd_cnext): likewise (cmd_cprev): likewise (cmd_inext): likewise (cmd_iprev): likewise (cmd_cother): likewise (cmd_iother): likewise (cmd_undo): likewise (cmd_prompt): likewise (cmd_describekey): likewise (cmd_dedicate): likewise * src/main.c (init_defaults): init maxundos to 20 (clean_up): free the undo history lists * src/window.h (set_active_window_body): new function (set_active_window_force): likewise * src/window.c (set_active_window): new function (set_active_window_force): likewise (set_active_window_body): renamed from set_active_window (set_active_window_body): Add code to handle dedicated frames. * src/screen.h (screen_dump): new prototype * src/screen.c (screen_dump): new function * src/linkedlist.h (list_last): new macro * src/group.h (group_last_window_by_class_complement): new prototype (group_last_window_by_class): likewise * src/group.c (group_last_window_by_class): new function (group_last_window_by_class_complement): likewise * src/globals.h (rp_frame_undos): new extern. (rp_num_frame_undos): likewise * src/globals.c (rp_frame_undos): new list. (rp_num_frame_undos): new global * src/frame.c (frame_new): init f->dedicated to 0. * src/data.h (struct rp_frame): add dedicated member. (struct rp_defaults): add maxundos member. (struct rp_frame_undo): new struct. * src/actions.c: new commands, cnext, cother, cprev,
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-15* src/data.h (struct rp_frame): renamed from rp_window_frame. Allsabetts
dependant code updated. * src/main.c: remove child_info global. Add rp_children global. (chld_handler): update the terminated and status fields of any terminated children. * src/events.c (handle_signals): loop through each child process and remove them from the list. Print a message for any child that doesn't return a 0 status. * src/data.h (rp_child_info): new fields, terminated and node. remove child_info global. Add rp_children global. * src/actions.c (spawn): Add the command to the list of children.
2003-05-15(struct rp_screen): rename fromsabetts
screen_info. Dependant code updated.
2003-04-04* src/actions.c (cmd_setenv): properly parse the environment namesabetts
and value using strtok. * src/window.c (add_to_window_list): init the window's frame_number to EMPTY. * src/number.h (numset_clear): new prototype * src/manage.c (unmanage)[AUTO_CLOSE]: code update for new globals. * src/frame.c (frame_new): init f->last_access to 0. (frame_dump): dump the X11 window ID, not the window number. (frame_read): new function * src/events.c (destroy_window): just unmanage the window. * src/actions.h (cmd_fdump): new prototype (cmd_frestore): likewise * src/actions.c (user_commands): new commands "fdump" and "frestore". (cmd_fdump): new function (cmd_frestore): likewise * src/number.c (numset_clear): new function.
2003-03-31* 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-18* src/actions.c (initialize_default_keybindings): add keybindingssabetts
for fselect and resize. Move keybinding for curframe. * src/split.c (create_initial_frame): call frame_new to allocate a frame. (split_frame): likewise * src/main.c (free_screen): call frame_free to free the screen frames. * src/frame.h (frame_new): new prototype (frame_free): likewise * src/frame.c (frame_new): new function. (frame_free): likewise
2003-03-07* 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