aboutsummaryrefslogtreecommitdiff
path: root/window.c
diff options
context:
space:
mode:
authorNicholas Marriott <nicholas.marriott@gmail.com>2020-04-27 15:15:12 +0100
committerNicholas Marriott <nicholas.marriott@gmail.com>2020-04-27 15:15:12 +0100
commit79b4d839521c154c39d7f86932f7dd4a7b870576 (patch)
tree3db3984808a7e08790ae459be218a3238d144c4f /window.c
parentc30e765c7b4659b472d2830bd2f114560a5205df (diff)
downloadrtmux-79b4d839521c154c39d7f86932f7dd4a7b870576.tar.gz
rtmux-79b4d839521c154c39d7f86932f7dd4a7b870576.tar.bz2
rtmux-79b4d839521c154c39d7f86932f7dd4a7b870576.zip
Use a grid cell not a style for the pane style.
Diffstat (limited to 'window.c')
-rw-r--r--window.c18
1 files changed, 9 insertions, 9 deletions
diff --git a/window.c b/window.c
index 3bf9ef95..7cdbf6a7 100644
--- a/window.c
+++ b/window.c
@@ -495,8 +495,8 @@ window_set_active_pane(struct window *w, struct window_pane *wp, int notify)
void
window_redraw_active_switch(struct window *w, struct window_pane *wp)
{
- struct style *sy1, *sy2;
- int c1, c2;
+ struct grid_cell *gc1, *gc2;
+ int c1, c2;
if (wp == w->active)
return;
@@ -506,18 +506,18 @@ window_redraw_active_switch(struct window *w, struct window_pane *wp)
* If the active and inactive styles or palettes are different,
* need to redraw the panes.
*/
- sy1 = &wp->cached_style;
- sy2 = &wp->cached_active_style;
- if (!style_equal(sy1, sy2))
+ gc1 = &wp->cached_gc;
+ gc2 = &wp->cached_active_gc;
+ if (!grid_cells_look_equal(gc1, gc2))
wp->flags |= PANE_REDRAW;
else {
- c1 = window_pane_get_palette(wp, sy1->gc.fg);
- c2 = window_pane_get_palette(wp, sy2->gc.fg);
+ c1 = window_pane_get_palette(wp, gc1->fg);
+ c2 = window_pane_get_palette(wp, gc2->fg);
if (c1 != c2)
wp->flags |= PANE_REDRAW;
else {
- c1 = window_pane_get_palette(wp, sy1->gc.bg);
- c2 = window_pane_get_palette(wp, sy2->gc.bg);
+ c1 = window_pane_get_palette(wp, gc1->bg);
+ c2 = window_pane_get_palette(wp, gc2->bg);
if (c1 != c2)
wp->flags |= PANE_REDRAW;
}