diff options
author | sabetts <sabetts> | 2007-03-08 08:43:35 +0000 |
---|---|---|
committer | sabetts <sabetts> | 2007-03-08 08:43:35 +0000 |
commit | 91f51337b0470f31e4dbca0b8a27345b9cfa52e8 (patch) | |
tree | 345ab3fe99dec5d93d21105776e0466758f06df9 /src/split.c | |
parent | c54d996f7a123eecbd4702414bd163a9f33327d0 (diff) | |
download | ratpoison-91f51337b0470f31e4dbca0b8a27345b9cfa52e8.zip |
* src/split.c (set_active_frame): call switch_frame hook
(show_frame_indicator): only show frame indicator
(set_active_frame): new arg force_indicator. all callers updated.
(show_frame_indicator): new arg force. all callers updated.
* src/main.c (init_defaults): init bar_in_padding
* src/globals.c (rp_switch_screen_hook): new hook
* src/data.h (struct rp_defaults): new slot, bar_in_padding
* src/bar.c (bar_x): honour bar_in_padding setting
(bar_y): likewise
* src/actions.c (init_set_vars): add barinpadding
(set_barinpadding): new function
* src/globals.h: new global rp_switch_screen_hook
Diffstat (limited to 'src/split.c')
-rw-r--r-- | src/split.c | 23 |
1 files changed, 15 insertions, 8 deletions
diff --git a/src/split.c b/src/split.c index ce9bb35..f5012d8 100644 --- a/src/split.c +++ b/src/split.c @@ -362,7 +362,7 @@ split_frame (rp_frame *frame, int way, int pixels) } update_bar (s); - show_frame_indicator(); + show_frame_indicator(0); } /* Splits the window vertically leaving the original with 'pixels' @@ -823,7 +823,7 @@ remove_frame (rp_frame *frame) /* Switch the input focus to another frame, and therefore a different window. */ void -set_active_frame (rp_frame *frame) +set_active_frame (rp_frame *frame, int force_indicator) { rp_screen *old_s = current_screen(); rp_screen *s = frames_screen (frame); @@ -856,7 +856,7 @@ set_active_frame (rp_frame *frame) if ((old != s->current_frame && num_frames(s) > 1) || s != old_s) { - show_frame_indicator(); + show_frame_indicator(force_indicator); /* run the frame switch hook. We call it in here because this is when a frame switch ACTUALLY (for sure) happens. */ @@ -869,6 +869,10 @@ set_active_frame (rp_frame *frame) { set_window_focus (s->key_window); } + + /* Call the switchscreen hook, when appropriate. */ + if (s != old_s) + hook_run (&rp_switch_screen_hook); } void @@ -906,7 +910,7 @@ exchange_with_frame (rp_screen *s, rp_frame *cur, rp_frame *frame) { s->current_frame = frame->number; /* mark it as active */ - show_frame_indicator(); + show_frame_indicator(0); } update_bar (s); @@ -957,11 +961,14 @@ hide_frame_indicator (void) } void -show_frame_indicator (void) +show_frame_indicator (int force) { - hide_frame_indicator (); - show_frame_message (defaults.frame_fmt); - alarm (defaults.frame_indicator_timeout); + if (num_frames (current_screen()) > 1 || force) + { + hide_frame_indicator (); + show_frame_message (defaults.frame_fmt); + alarm (defaults.frame_indicator_timeout); + } } void |