diff options
author | Nicholas Marriott <nicholas.marriott@gmail.com> | 2007-12-06 09:46:23 +0000 |
---|---|---|
committer | Nicholas Marriott <nicholas.marriott@gmail.com> | 2007-12-06 09:46:23 +0000 |
commit | 103748d6adfe1b2d706cb0a1e1a128be5366d655 (patch) | |
tree | b9d4feef5012083d9c0ba96693322286645a27a3 /status.c | |
parent | 6f142e9ac61783e79c27e56ed6aa2fc7ff13683d (diff) |
Major reorganisation of screen handling.
Diffstat (limited to 'status.c')
-rw-r--r-- | status.c | 24 |
1 files changed, 12 insertions, 12 deletions
@@ -1,4 +1,4 @@ -/* $Id: status.c,v 1.14 2007-11-27 19:23:34 nicm Exp $ */ +/* $Id: status.c,v 1.15 2007-12-06 09:46:23 nicm Exp $ */ /* * Copyright (c) 2007 Nicholas Marriott <nicm@users.sourceforge.net> @@ -27,16 +27,16 @@ void printflike3 status_print(struct buffer *, size_t *, const char *, ...); void status_write_client(struct client *c) { - struct screen_draw_ctx ctx; - struct winlink *wl; - char flag; + struct screen_redraw_ctx ctx; + struct winlink *wl; + char flag; if (status_lines == 0 || c->sy <= status_lines) return; - screen_draw_start_client(&ctx, c, 0, 0); - screen_draw_move_cursor(&ctx, 0, c->sy - status_lines); - screen_draw_set_attributes(&ctx, 0, status_colour); + screen_redraw_start_client(&ctx, c); + screen_redraw_move_cursor(&ctx, 0, c->sy - status_lines); + screen_redraw_set_attributes(&ctx, 0, status_colour); RB_FOREACH(wl, winlinks, &c->session->windows) { flag = ' '; @@ -46,15 +46,15 @@ status_write_client(struct client *c) flag = '*'; if (session_hasbell(c->session, wl)) flag = '!'; - screen_draw_write_string( + screen_redraw_write_string( &ctx, "%d:%s%c ", wl->idx, wl->window->name, flag); - if (ctx.cx >= screen_last_x(ctx.s)) + if (ctx.s->cx >= screen_last_x(ctx.s)) break; } - screen_draw_clear_line_to(&ctx, screen_last_x(ctx.s)); + screen_redraw_clear_end_of_line(&ctx); - screen_draw_stop(&ctx); + screen_redraw_stop(&ctx); } void @@ -63,7 +63,7 @@ status_write_window(struct window *w) struct client *c; u_int i; - if (w->screen.mode & MODE_HIDDEN) + if (w->flags & WINDOW_HIDDEN) return; for (i = 0; i < ARRAY_LENGTH(&clients); i++) { |