From: Jacob Nevins Date: Fri, 27 Aug 2004 12:24:08 +0000 (+0000) Subject: Handle WM_SYSCOLORCHANGE if using system colours. (Resets the whole palette, X-Git-Tag: 0.56~44 X-Git-Url: https://asedeno.scripts.mit.edu/gitweb/?a=commitdiff_plain;h=1393528a3a29d94219fc3edc750e7b0e202d6982;p=PuTTY.git Handle WM_SYSCOLORCHANGE if using system colours. (Resets the whole palette, whereas ideally it would restrict itself to the affected colour slots.) [originally from svn r4505] --- 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;