diff options
author | sabetts <sabetts> | 2002-03-13 08:23:30 +0000 |
---|---|---|
committer | sabetts <sabetts> | 2002-03-13 08:23:30 +0000 |
commit | cdb7cc536917ee9d34d4d9f5ed05a3b751044027 (patch) | |
tree | 32813e57d6bebea81d6bbb4054e5b90792faf7e6 /src/split.c | |
parent | b324f95535f20617b29f9d6202cd868383dfc0ce (diff) | |
download | ratpoison-cdb7cc536917ee9d34d4d9f5ed05a3b751044027.zip |
* src/split.c (set_active_frame): fix to operate properly with
multiple screens.
* src/data.h (struct rp_window_frame): new data member 'number'.
* src/actions.h (cmd_prevscreen): new prototype
(cmd_nextscreen): likewise
* src/actions.c (user_commands): new commands "nextscreen" and
"prevscreen"
(cmd_nextscreen): new function
(cmd_prevscreen): likewise
Diffstat (limited to 'src/split.c')
-rw-r--r-- | src/split.c | 15 |
1 files changed, 12 insertions, 3 deletions
diff --git a/src/split.c b/src/split.c index 47efed3..f9805ce 100644 --- a/src/split.c +++ b/src/split.c @@ -611,17 +611,26 @@ remove_frame (rp_window_frame *frame) free (frame); } +/* Switch the input focus to another frame, and therefore a different + window. */ void set_active_frame (rp_window_frame *frame) { + screen_info *old_s = current_screen(); screen_info *s = frames_screen (frame); - rp_window_frame *old = s->rp_current_frame; + rp_window_frame *old = current_screen()->rp_current_frame; - give_window_focus (frame->win, s->rp_current_frame->win); + /* Make the switch */ + give_window_focus (frame->win, old->win); update_last_access (frame); s->rp_current_frame = frame; - if (old != s->rp_current_frame && num_frames(s) > 1) + /* If frame->win == NULL, then rp_current_screen is not updated. */ + rp_current_screen = s->screen_num; + + /* Possibly show the frame indicator. */ + if ((old != s->rp_current_frame && num_frames(s) > 1) + || s != old_s) { show_frame_indicator(); } |