mirror of
https://github.com/tmux/tmux.git
synced 2025-01-05 23:38:48 +00:00
Destroy screens properly.
This commit is contained in:
parent
532757fd1c
commit
9d563c340b
12
screen.c
12
screen.c
@ -1,4 +1,4 @@
|
||||
/* $Id: screen.c,v 1.17 2007-09-29 18:57:15 nicm Exp $ */
|
||||
/* $Id: screen.c,v 1.18 2007-10-01 14:15:48 nicm Exp $ */
|
||||
|
||||
/*
|
||||
* Copyright (c) 2007 Nicholas Marriott <nicm@users.sourceforge.net>
|
||||
@ -157,6 +157,16 @@ screen_resize(struct screen *s, u_int sx, u_int sy)
|
||||
}
|
||||
}
|
||||
|
||||
/* Destroy a screen. */
|
||||
void
|
||||
screen_destroy(struct screen *s)
|
||||
{
|
||||
screen_free_lines(s, 0, s->sy);
|
||||
xfree(s->grid_data);
|
||||
xfree(s->grid_attr);
|
||||
xfree(s->grid_colr);
|
||||
}
|
||||
|
||||
/* Draw a set of lines on the screen. */
|
||||
void
|
||||
screen_draw(struct screen *s, struct buffer *b, u_int uy, u_int ly)
|
||||
|
3
tmux.h
3
tmux.h
@ -1,4 +1,4 @@
|
||||
/* $Id: tmux.h,v 1.28 2007-09-30 13:02:14 nicm Exp $ */
|
||||
/* $Id: tmux.h,v 1.29 2007-10-01 14:15:48 nicm Exp $ */
|
||||
|
||||
/*
|
||||
* Copyright (c) 2007 Nicholas Marriott <nicm@users.sourceforge.net>
|
||||
@ -565,6 +565,7 @@ void input_translate_key(struct buffer *, int);
|
||||
|
||||
/* screen.c */
|
||||
void screen_create(struct screen *, u_int, u_int);
|
||||
void screen_destroy(struct screen *);
|
||||
void screen_resize(struct screen *, u_int, u_int);
|
||||
void screen_draw(struct screen *, struct buffer *, u_int, u_int);
|
||||
size_t screen_store_attributes(struct buffer *, u_char);
|
||||
|
4
window.c
4
window.c
@ -1,4 +1,4 @@
|
||||
/* $Id: window.c,v 1.14 2007-09-29 14:25:49 nicm Exp $ */
|
||||
/* $Id: window.c,v 1.15 2007-10-01 14:15:48 nicm Exp $ */
|
||||
|
||||
/*
|
||||
* Copyright (c) 2007 Nicholas Marriott <nicm@users.sourceforge.net>
|
||||
@ -178,6 +178,8 @@ window_destroy(struct window *w)
|
||||
|
||||
input_free(&w->ictx);
|
||||
|
||||
screen_destroy(&w->screen);
|
||||
|
||||
buffer_destroy(w->in);
|
||||
buffer_destroy(w->out);
|
||||
xfree(w);
|
||||
|
Loading…
Reference in New Issue
Block a user