summaryrefslogtreecommitdiffstats
path: root/status.c
diff options
context:
space:
mode:
authornicm <nicm>2019-03-15 14:46:58 +0000
committernicm <nicm>2019-03-15 14:46:58 +0000
commit85044a634bbcd660ae4b7c9ff4aed7e3891af5d4 (patch)
tree71e7996ddc5a8ce2b9b9900d858c90770cdb1a02 /status.c
parent2d71bef0ca3d0c31975f70118f632fe30393b059 (diff)
Move status line free into its own function.
Diffstat (limited to 'status.c')
-rw-r--r--status.c18
1 files changed, 17 insertions, 1 deletions
diff --git a/status.c b/status.c
index bd639d79..65579a26 100644
--- a/status.c
+++ b/status.c
@@ -296,7 +296,23 @@ status_get_window_at(struct client *c, u_int x)
return (NULL);
}
-/* Draw status for client on the last lines of given context. */
+/* Free status line. */
+void
+status_free(struct client *c)
+{
+ struct status_line *sl = &c->status;
+
+ if (event_initialized(&sl->timer))
+ evtimer_del(&sl->timer);
+
+ screen_free(&sl->status);
+ if (sl->old_status != NULL) {
+ screen_free(sl->old_status);
+ free(sl->old_status);
+ }
+}
+
+/* Draw status line for client. */
int
status_redraw(struct client *c)
{