xray: kill subplane when done

pull/217/head
nick black 5 years ago
parent 43e0cb3d30
commit e8064f717b
No known key found for this signature in database
GPG Key ID: 5F43400C21CBFACC

@ -9,7 +9,7 @@
#include <sys/eventfd.h>
#include "demo.h"
#define INITIAL_TABLET_COUNT 2
#define INITIAL_TABLET_COUNT 4
// FIXME ought just be an unordered_map
typedef struct tabletctx {

@ -13,6 +13,8 @@ static const char* leg[] = {
" 888P ",
};
static struct ncplane* killme; // FIXME
static int
perframecb(struct notcurses* nc, struct ncvisual* ncv __attribute__ ((unused))){
static struct ncplane* n = NULL;
@ -30,6 +32,7 @@ perframecb(struct notcurses* nc, struct ncvisual* ncv __attribute__ ((unused))){
if(n == NULL){
return -1;
}
killme = n;
}
ncplane_dim_yx(n, &dimy, &dimx);
y = 0;
@ -106,5 +109,6 @@ int xray_demo(struct notcurses* nc){
ncvisual_stream(nc, ncv, &averr, perframecb);
ncvisual_destroy(ncv);
ncplane_destroy(n);
ncplane_destroy(killme);
return 0;
}

Loading…
Cancel
Save