mirror of
https://git.tartarus.org/simon/putty.git
synced 2025-06-30 19:12:48 -05:00
Fix changing colours in Change Settings.
Sinceca9cd983e1
, 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 withca9cd983e1
). 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.
This commit is contained in:
@ -2310,7 +2310,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);
|
||||
@ -3300,7 +3300,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);
|
||||
|
Reference in New Issue
Block a user