diff options
author | Nicholas Marriott <nicm@openbsd.org> | 2009-07-20 14:37:51 +0000 |
---|---|---|
committer | Nicholas Marriott <nicm@openbsd.org> | 2009-07-20 14:37:51 +0000 |
commit | 54afcfbfb4e0e972455b870887151cb04d29c9c7 (patch) | |
tree | c1495aaa5f8d083b6752345cdbc15b2bbbda972c /server.c | |
parent | b292f71c49b4222b34684aee44029ca2d6aeb4dd (diff) | |
download | rtmux-54afcfbfb4e0e972455b870887151cb04d29c9c7.tar.gz rtmux-54afcfbfb4e0e972455b870887151cb04d29c9c7.tar.bz2 rtmux-54afcfbfb4e0e972455b870887151cb04d29c9c7.zip |
Display the number of failed password attempts (if any) when the server is
locked. From Tom Doherty.
Diffstat (limited to 'server.c')
-rw-r--r-- | server.c | 12 |
1 files changed, 12 insertions, 0 deletions
@@ -579,6 +579,7 @@ server_redraw_locked(struct client *c) { struct screen_write_ctx ctx; struct screen screen; + struct grid_cell gc; u_int colour, xx, yy, i; int style; @@ -589,10 +590,21 @@ server_redraw_locked(struct client *c) colour = options_get_number(&global_w_options, "clock-mode-colour"); style = options_get_number(&global_w_options, "clock-mode-style"); + memcpy(&gc, &grid_default_cell, sizeof gc); + gc.fg = colour; + gc.attr |= GRID_ATTR_BRIGHT; + screen_init(&screen, xx, yy, 0); screen_write_start(&ctx, NULL, &screen); clock_draw(&ctx, colour, style); + + if (password_failures != 0) { + screen_write_cursormove(&ctx, 0, 0); + screen_write_puts( + &ctx, &gc, "%u failed attempts", password_failures); + } + screen_write_stop(&ctx); for (i = 0; i < screen_size_y(&screen); i++) |