aboutsummaryrefslogtreecommitdiff
path: root/tty-write.c
diff options
context:
space:
mode:
Diffstat (limited to 'tty-write.c')
-rw-r--r--tty-write.c23
1 files changed, 22 insertions, 1 deletions
diff --git a/tty-write.c b/tty-write.c
index 62adb8b2..409ed08c 100644
--- a/tty-write.c
+++ b/tty-write.c
@@ -1,4 +1,4 @@
-/* $Id: tty-write.c,v 1.7 2009-01-18 12:09:42 nicm Exp $ */
+/* $Id: tty-write.c,v 1.8 2009-01-27 21:39:15 nicm Exp $ */
/*
* Copyright (c) 2007 Nicholas Marriott <nicm@users.sourceforge.net>
@@ -55,3 +55,24 @@ tty_vwrite_window(void *ptr, enum tty_cmd cmd, va_list ap)
}
}
}
+
+void
+tty_write_cursor_off(void *ptr)
+{
+ struct window_pane *wp = ptr;
+ struct client *c;
+ u_int i;
+
+ if (wp->window->flags & WINDOW_HIDDEN || wp->flags & PANE_HIDDEN)
+ return;
+
+ for (i = 0; i < ARRAY_LENGTH(&clients); i++) {
+ c = ARRAY_ITEM(&clients, i);
+ if (c == NULL || c->session == NULL)
+ continue;
+ if (c->flags & CLIENT_SUSPENDED)
+ continue;
+
+ tty_cursor_off(&c->tty);
+ }
+}