csi: implement private modes 2034 + 2038

2034 enables window resize notifications, with the notifications being
in pixels.

2038 does the same, but in characters instead of pixels.

See
https://gist.github.com/rockorager/e695fb2924d36b2bcf1fff4a3704bd83
for specification
This commit is contained in:
Daniel Eklöf 2024-06-28 18:38:03 +02:00
parent cbe399ecd9
commit 774c60602b
No known key found for this signature in database
GPG key ID: 5BBD4992C116573F
6 changed files with 119 additions and 30 deletions

View file

@ -479,6 +479,9 @@ struct terminal {
bool sixel_display_mode:1;
bool sixel_private_palette:1;
bool sixel_cursor_right_of_graphics:1;
bool size_notifications_pixels:1;
bool size_notifications_chars:1;
} xtsave;
bool window_title_has_been_set;
@ -741,6 +744,9 @@ struct terminal {
char *cwd;
bool grapheme_shaping;
bool size_notifications_pixels; /* Private mode 2034 */
bool size_notifications_chars; /* Private mode 2038 */
};
struct config;
@ -860,6 +866,13 @@ bool term_spawn_new(const struct terminal *term);
void term_enable_app_sync_updates(struct terminal *term);
void term_disable_app_sync_updates(struct terminal *term);
void term_enable_size_notifications_pixels(struct terminal *term);
void term_disable_size_notifications_pixels(struct terminal *term);
void term_enable_size_notifications_chars(struct terminal *term);
void term_disable_size_notifications_chars(struct terminal *term);
void term_report_window_size_pixels(struct terminal *term, bool include_padding);
void term_report_window_size_chars(struct terminal *term);
enum term_surface term_surface_kind(
const struct terminal *term, const struct wl_surface *surface);