diff options
author | sabetts <sabetts> | 2004-02-27 09:29:25 +0000 |
---|---|---|
committer | sabetts <sabetts> | 2004-02-27 09:29:25 +0000 |
commit | 152a72b51659d4e7e7f919bf342c0b5f559ffefd (patch) | |
tree | 027e42a59d809b04aff0caab4de8c9aa80cee1ae /src/split.c | |
parent | f83599ce2cf6197a53e66a9a08854d0a51b50a35 (diff) | |
download | ratpoison-152a72b51659d4e7e7f919bf342c0b5f559ffefd.zip |
* src/screen.c (screen_free_nums): new function. prototype added
(init_screens): init rp_frame_numset
(init_screen): set screen's frames_numset to rp_frame_numset
* src/globals.h: new global prototype, rp_frame_numset
* src/globals.c: new global, rp_frame_numset
* src/split.c (find_last_frame): find the last from of all the
screens. prototype updated. Callers updated.
(find_frame_number): search all screens. prototype
updated. callers updated.
* src/actions.c (cmd_fselect): select from frames in all screens.
Diffstat (limited to 'src/split.c')
-rw-r--r-- | src/split.c | 32 |
1 files changed, 22 insertions, 10 deletions
diff --git a/src/split.c b/src/split.c index 787c587..086c645 100644 --- a/src/split.c +++ b/src/split.c @@ -194,18 +194,24 @@ init_frame_list (rp_screen *screen) } rp_frame * -find_last_frame (rp_screen *s) +find_last_frame () { rp_frame *cur, *last = NULL; int last_access = -1; + int i; - list_for_each_entry (cur, &s->frames, node) + for (i=0; i<num_screens; i++) { - if (cur->number != s->current_frame - && cur->last_access > last_access) + rp_screen *s = &screens[i]; + + list_for_each_entry (cur, &s->frames, node) { - last_access = cur->last_access; - last = cur; + if (cur->number != current_screen()->current_frame + && cur->last_access > last_access) + { + last_access = cur->last_access; + last = cur; + } } } @@ -1013,14 +1019,20 @@ find_frame_right (rp_frame *frame) } rp_frame * -find_frame_number (rp_screen *s, int num) +find_frame_number (int num) { + int i; rp_frame *cur; - list_for_each_entry (cur, &s->frames, node) + for (i=0; i<num_screens; i++) { - if (cur->number == num) - return cur; + rp_screen *s = &screens[i]; + + list_for_each_entry (cur, &s->frames, node) + { + if (cur->number == num) + return cur; + } } return NULL; |