aboutsummaryrefslogtreecommitdiff
path: root/terminal.h
diff options
context:
space:
mode:
authorDaniel Eklöf <daniel@ekloef.se>2020-03-16 16:05:44 +0000
committerDaniel Eklöf <daniel@ekloef.se>2020-03-16 16:47:27 +0000
commit233a909160e6e590e6947f9dbfcaa9d0e3c57729 (patch)
tree13fab63d8c6aa8122a8d8d9eae2fb398c306a3c7 /terminal.h
parentalt-screen: use a custom 'saved' cursor when switching to alt screen (diff)
term: ptmx: don't enqueue extra frame render when app sync updates have been changed
Track whether app-sync updates were enabled or disabled while handling the current chunk of PTMX data. This fixes and issue where we called render_refresh() unnecessarily under (at least) the following conditions: * Application sent "BSU <data> ESU" in the *same* chunk. In this case we never saw that app sync was enabled and triggered delayed rendering as usual. * Application sent ESU. While we had noticed app sync updates being enabled in earlier PTMX reads, when it was disabled *in the current* PTMX read, we treated it as if it had not been enabled at all. This caused us to trigger delayed rendering. Now we call render_refresh() directly from ESU, and detect the "flip off" case in PTMX read and avoid triggering a delayed rendering. The end result of all this is that each key press (for e.g. scrolling in a pager application) went from two frames being rendered, to a single frame.
Diffstat (limited to 'terminal.h')
-rw-r--r--terminal.h1
1 files changed, 1 insertions, 0 deletions
diff --git a/terminal.h b/terminal.h
index 67785399..3685c0d7 100644
--- a/terminal.h
+++ b/terminal.h
@@ -350,6 +350,7 @@ struct terminal {
struct {
bool enabled;
int timer_fd;
+ bool flipped;
} app_sync_updates;
/* Render threads + synchronization primitives */