From 6092b4eea75fc013711d04f50f19b13e36391b6f Mon Sep 17 00:00:00 2001 From: jacob Date: Sat, 25 Feb 2006 14:13:46 +0000 Subject: [PATCH] Alain Guibert points out that palette changes weren't causing the space between the text area and the window border to be refreshed. Fixed on Windows. Gtk still has a similar problem. git-svn-id: svn://svn.tartarus.org/sgt/putty@6583 cda61777-01e9-0310-a592-d414129be87e --- windows/window.c | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/windows/window.c b/windows/window.c index 722f78e0..b6f3cea4 100644 --- a/windows/window.c +++ b/windows/window.c @@ -4400,6 +4400,12 @@ void palette_set(void *frontend, int n, int r, int g, int b) UnrealizeObject(pal); RealizePalette(hdc); free_ctx(hdc); + } else { + if (n == (ATTR_DEFBG>>ATTR_BGSHIFT)) + /* If Default Background changes, we need to ensure any + * space between the text area and the window border is + * redrawn. */ + InvalidateRect(hwnd, NULL, TRUE); } } @@ -4428,6 +4434,10 @@ void palette_reset(void *frontend) hdc = get_ctx(frontend); RealizePalette(hdc); free_ctx(hdc); + } else { + /* Default Background may have changed. Ensure any space between + * text area and window border is redrawn. */ + InvalidateRect(hwnd, NULL, TRUE); } } -- 2.11.0