diff options
author | sabetts <sabetts> | 2003-02-22 11:16:55 +0000 |
---|---|---|
committer | sabetts <sabetts> | 2003-02-22 11:16:55 +0000 |
commit | 00a37f7479fc780669afd3ad82d938a1096952d0 (patch) | |
tree | d3c88eb1ae06ed1c7c94c69057f0fcbf6fce48a1 /src/manage.c | |
parent | 4cacfe9c7bf4fea269a7f99879bc3f1e6ea9d45b (diff) | |
download | ratpoison-00a37f7479fc780669afd3ad82d938a1096952d0.zip |
* 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/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
Diffstat (limited to 'src/manage.c')
-rw-r--r-- | src/manage.c | 14 |
1 files changed, 5 insertions, 9 deletions
diff --git a/src/manage.c b/src/manage.c index 1d129fd..5306a1c 100644 --- a/src/manage.c +++ b/src/manage.c @@ -275,8 +275,7 @@ void unmanage (rp_window *w) { return_window_number (w->number); - remove_from_list (w); - + list_del (&w->node); free_window (w); #ifdef AUTO_CLOSE @@ -640,8 +639,8 @@ map_window (rp_window *win) grab_prefix_key (win->w); /* Put win in the mapped window list */ - remove_from_list (win); - insert_into_list (win, rp_mapped_window_sentinel); + list_del (&win->node); + insert_into_list (win, &rp_mapped_window); /* The window has never been accessed since it was brought back from the Withdrawn state. */ @@ -723,8 +722,7 @@ withdraw_window (rp_window *win) return_window_number (win->number); win->number = -1; - remove_from_list (win); - append_to_list (win, rp_unmapped_window_sentinel); + list_move_tail(&win->node, &rp_unmapped_window); ignore_badwindow++; @@ -746,9 +744,7 @@ hide_others (rp_window *win) frame = find_windows_frame (win); if (frame == NULL) return; - for (cur = rp_mapped_window_sentinel->next; - cur != rp_mapped_window_sentinel; - cur = cur->next) + list_for_each_entry (cur, &rp_mapped_window, node) { if (find_windows_frame (cur) || cur->state != NormalState |