From 49a332fff433afd476a1b1d3faafc34c1d847288 Mon Sep 17 00:00:00 2001 From: jacob Date: Fri, 27 Aug 2004 12:24:08 +0000 Subject: [PATCH] Handle WM_SYSCOLORCHANGE if using system colours. (Resets the whole palette, whereas ideally it would restrict itself to the affected colour slots.) git-svn-id: svn://svn.tartarus.org/sgt/putty@4505 cda61777-01e9-0310-a592-d414129be87e --- window.c | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/window.c b/window.c index d4ebcf58..ef19552a 100644 --- a/window.c +++ b/window.c @@ -2767,6 +2767,16 @@ static LRESULT CALLBACK WndProc(HWND hwnd, UINT message, return TRUE; } break; + case WM_SYSCOLORCHANGE: + if (cfg.system_colour) { + /* Refresh palette from system colours. */ + /* XXX actually this zaps the entire palette. */ + systopalette(); + init_palette(); + /* Force a repaint of the terminal window. */ + term_invalidate(term); + } + break; case WM_AGENT_CALLBACK: { struct agent_callback *c = (struct agent_callback *)lParam; -- 2.11.0