diff options
author | Thomas Adam <thomas@xteddy.org> | 2015-09-14 14:01:09 +0100 |
---|---|---|
committer | Thomas Adam <thomas@xteddy.org> | 2015-09-14 14:01:09 +0100 |
commit | 4afe26fa82fd2701cbf686799668d685645b220e (patch) | |
tree | ebb25aa2f8485b643136b210ee0df521c5cbe4c8 /window.c | |
parent | 74b958ecbed7102a0f3f5faf5d976411726661ba (diff) | |
parent | 216ddf3da5798fe3e7246310ebe0b77e591ee34e (diff) | |
download | rtmux-4afe26fa82fd2701cbf686799668d685645b220e.tar.gz rtmux-4afe26fa82fd2701cbf686799668d685645b220e.tar.bz2 rtmux-4afe26fa82fd2701cbf686799668d685645b220e.zip |
Merge branch 'obsd-master'
Diffstat (limited to 'window.c')
-rw-r--r-- | window.c | 24 |
1 files changed, 24 insertions, 0 deletions
@@ -422,6 +422,30 @@ window_set_active_pane(struct window *w, struct window_pane *wp) return (1); } +void +window_redraw_active_switch(struct window *w, struct window_pane *wp) +{ + const struct grid_cell *agc, *wgc; + + if (wp == w->active) + return; + + /* + * If window-style and window-active-style are the same, we don't need + * to redraw panes when switching active panes. Otherwise, if the + * active or inactive pane do not have a custom style, they will need + * to be redrawn. + */ + agc = options_get_style(&w->options, "window-active-style"); + wgc = options_get_style(&w->options, "window-style"); + if (style_equal(agc, wgc)) + return; + if (style_equal(&grid_default_cell, &w->active->colgc)) + w->active->flags |= PANE_REDRAW; + if (style_equal(&grid_default_cell, &wp->colgc)) + wp->flags |= PANE_REDRAW; +} + struct window_pane * window_get_active_at(struct window *w, u_int x, u_int y) { |