]> asedeno.scripts.mit.edu Git - PuTTY.git/blobdiff - window.c
Handle WM_SYSCOLORCHANGE if using system colours. (Resets the whole palette,
[PuTTY.git] / window.c
index d4ebcf580ff60938c6707e9d39e1160964e375af..ef19552a786f4f91d61e9765cbc9197aa5854398 100644 (file)
--- 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;