Do not send theme unless it has changed, and do not send immediately

when updates are enabled. GitHub issue 5787.
This commit is contained in:
nicm
2026-01-06 20:05:57 +00:00
parent 035a2f35d4
commit f226804149
4 changed files with 36 additions and 24 deletions

21
tmux.h
View File

@@ -1135,6 +1135,16 @@ struct window_pane_resize {
};
TAILQ_HEAD(window_pane_resizes, window_pane_resize);
/*
* Client theme, this is worked out from the background colour if not reported
* by terminal.
*/
enum client_theme {
THEME_UNKNOWN,
THEME_LIGHT,
THEME_DARK
};
/* Child window structure. */
struct window_pane {
u_int id;
@@ -1198,6 +1208,7 @@ struct window_pane {
struct grid_cell cached_gc;
struct grid_cell cached_active_gc;
struct colour_palette palette;
enum client_theme last_theme;
int pipe_fd;
struct bufferevent *pipe_event;
@@ -1876,16 +1887,6 @@ struct overlay_ranges {
u_int nx[OVERLAY_MAX_RANGES];
};
/*
* Client theme, this is worked out from the background colour if not reported
* by terminal.
*/
enum client_theme {
THEME_UNKNOWN,
THEME_LIGHT,
THEME_DARK
};
/* Client connection. */
typedef int (*prompt_input_cb)(struct client *, void *, const char *, int);
typedef void (*prompt_free_cb)(void *);