From 38461eef6f3b612277bf48e49b9cc6c3b79e25bb Mon Sep 17 00:00:00 2001 From: Daniel Eklöf Date: Sun, 30 Jun 2024 19:44:17 +0200 Subject: csi: in-band window resize notifications, private mode 2048 This implements https://gist.github.com/rockorager/e695fb2924d36b2bcf1fff4a3704bd83, in-band window resize notifications. When user enables private mode 2048 (in-band resize notifications), *always* send current size, even if the mode is already active. This ensures applications can rely on getting a reply from the terminal. --- terminal.h | 7 +++++++ 1 file changed, 7 insertions(+) (limited to 'terminal.h') diff --git a/terminal.h b/terminal.h index 926870c1..44a101eb 100644 --- a/terminal.h +++ b/terminal.h @@ -541,6 +541,8 @@ struct terminal { bool app_sync_updates:1; bool grapheme_shaping:1; + bool size_notifications:1; + bool sixel_display_mode:1; bool sixel_private_palette:1; bool sixel_cursor_right_of_graphics:1; @@ -800,6 +802,7 @@ struct terminal { char *cwd; bool grapheme_shaping; + bool size_notifications; }; struct config; @@ -946,6 +949,10 @@ void term_osc8_close(struct terminal *term); bool term_ptmx_pause(struct terminal *term); bool term_ptmx_resume(struct terminal *term); +void term_enable_size_notifications(struct terminal *term); +void term_disable_size_notifications(struct terminal *term); +void term_send_size_notification(struct terminal *term); + static inline void term_reset_grapheme_state(struct terminal *term) { #if defined(FOOT_GRAPHEME_CLUSTERING) -- cgit v1.3