diff options
| author | Daniel Eklöf <daniel@ekloef.se> | 2022-10-09 14:15:29 +0000 |
|---|---|---|
| committer | Daniel Eklöf <daniel@ekloef.se> | 2022-10-10 15:19:18 +0000 |
| commit | 54d637e2b47fd55e4abde1e28f7f665e69c2a995 (patch) | |
| tree | 5ac4f53208cc3cd47ff13c9349ada2cdf73c938b | |
| parent | term: use SIZE_MAX instead of (size_t)-1ll (diff) | |
term: ptmx: don’t consume anything while doing an interactive resize
The ‘normal’ grid in use during an interactive resize is temporary;
all changes done to it will be lost when the resize is finished.
| -rw-r--r-- | terminal.c | 11 |
1 files changed, 11 insertions, 0 deletions
@@ -268,6 +268,16 @@ fdm_ptmx(struct fdm *fdm, int fd, int events, void *data) cursor_blink_rearm_timer(term); } + if (unlikely(term->interactive_resizing.grid != NULL)) { + /* + * Don’t consume PTMX while we’re doing an interactive resize, + * since the ‘normal’ grid we’re currently using is a + * temporary one - all changes done to it will be lost when + * the interactive resize ends. + */ + return 0; + } + uint8_t buf[24 * 1024]; const size_t max_iterations = !hup ? 10 : SIZE_MAX; @@ -291,6 +301,7 @@ fdm_ptmx(struct fdm *fdm, int fd, int events, void *data) break; } + xassert(term->interactive_resizing.grid == NULL); vt_from_slave(term, buf, count); } |
