mirror of
https://github.com/dankamongmen/notcurses
synced 2025-03-09 09:09:03 -04:00
[render] call notcurses_refresh() on sigcont #281
This commit is contained in:
parent
c707e49bd3
commit
b91f150e96
2
NEWS.md
2
NEWS.md
@ -27,6 +27,8 @@ rearrangements of Notcurses.
|
||||
lengths rather than closing coordinates, observing the same semantics as
|
||||
outlined above.
|
||||
* `ncplayer` now defaults to pixel blitting.
|
||||
* `NCKEY_SIGNAL` is no longer a synonym for `NCKEY_RESIZE`, but instead
|
||||
indicates receipt of `SIGCONT`.
|
||||
|
||||
* 2.4.9 (2021-11-11)
|
||||
* Added `ncnmetric()`, which uses `snprintf()` internally. `ncmetric()`
|
||||
|
@ -3,6 +3,7 @@
|
||||
#include <unistd.h>
|
||||
#include "automaton.h"
|
||||
#include "internal.h"
|
||||
#include "render.h"
|
||||
#include "in.h"
|
||||
|
||||
// Notcurses takes over stdin, and if it is not connected to a terminal, also
|
||||
@ -34,6 +35,7 @@ void sigwinch_handler(int signo){
|
||||
resize_seen = signo;
|
||||
}else if(signo == SIGCONT){
|
||||
cont_seen = signo;
|
||||
sigcont_seen_for_render = 1;
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -4,6 +4,8 @@
|
||||
#include <notcurses/direct.h>
|
||||
#include "internal.h"
|
||||
|
||||
sig_atomic_t sigcont_seen_for_render = 0;
|
||||
|
||||
// update for a new visual area of |rows|x|cols|, neither of which may be zero.
|
||||
// copies that area of the lastframe (damage map) which is shared between the
|
||||
// two. new areas are initialized to empty, just like a new plane. lost areas
|
||||
@ -1477,6 +1479,10 @@ ncpile_render_internal(ncplane* n, struct crender* rvec, int leny, int lenx){
|
||||
}
|
||||
|
||||
int ncpile_rasterize(ncplane* n){
|
||||
if(sigcont_seen_for_render){
|
||||
sigcont_seen_for_render = 0;
|
||||
notcurses_refresh(ncplane_notcurses(n), NULL, NULL);
|
||||
}
|
||||
struct timespec start, rasterdone, writedone;
|
||||
clock_gettime(CLOCK_MONOTONIC, &start);
|
||||
ncpile* pile = ncplane_pile(n);
|
||||
|
Loading…
x
Reference in New Issue
Block a user