1
0
mirror of https://git.tartarus.org/simon/putty.git synced 2025-07-18 19:41:01 -05:00

Fix changing colours in Change Settings.

Since ca9cd983e1, changing colour config mid-session had no effect
(until the palette was reset for some other reason). Now it does take
effect immediately (provided that the palette has not been overridden by
escape sequence -- this is new with ca9cd983e1).

This changes the semantics of palette_reset(): the only important
parameter when doing that is whether we keep escape sequence overrides
-- there's no harm in re-fetching config and platform colours whether or
not they've changed -- so that's what the parameter becomes (with a
sense that doesn't require changing the call sites). The other part of
this change is actually remembering to trigger this when the
configuration is changed.

(cherry picked from commit 1e726c94e8)
This commit is contained in:
Jacob Nevins
2021-05-15 22:05:27 +01:00
committed by Simon Tatham
parent 27a04d96a3
commit ff53c6716a
3 changed files with 70 additions and 39 deletions

View File

@ -2394,7 +2394,7 @@ static LRESULT CALLBACK WndProc(HWND hwnd, UINT message,
if (conf_get_bool(conf, CONF_system_colour) !=
conf_get_bool(prev_conf, CONF_system_colour))
term_notify_palette_overrides_changed(term);
term_notify_palette_changed(term);
/* Pass new config data to the terminal */
term_reconfig(term, conf);
@ -3384,7 +3384,7 @@ static LRESULT CALLBACK WndProc(HWND hwnd, UINT message,
case WM_SYSCOLORCHANGE:
if (conf_get_bool(conf, CONF_system_colour)) {
/* Refresh palette from system colours. */
term_notify_palette_overrides_changed(term);
term_notify_palette_changed(term);
init_palette();
/* Force a repaint of the terminal window. */
term_invalidate(term);