From: jacob Date: Sun, 12 Mar 2006 22:17:46 +0000 (+0000) Subject: Equivalent of r6583 window-border palette-change fix for Gtk. X-Git-Url: https://git.distorted.org.uk/u/mdw/putty/commitdiff_plain/8d3b4d681cd6315aef0974ade25e194d7f725fa7 Equivalent of r6583 window-border palette-change fix for Gtk. git-svn-id: svn://svn.tartarus.org/sgt/putty@6609 cda61777-01e9-0310-a592-d414129be87e --- diff --git a/unix/gtkwin.c b/unix/gtkwin.c index cb582164..cd8c7150 100644 --- a/unix/gtkwin.c +++ b/unix/gtkwin.c @@ -1392,8 +1392,13 @@ void palette_set(void *frontend, int n, int r, int g, int b) if (n > NALLCOLOURS) return; real_palette_set(inst, n, r, g, b); - if (n == 258) + if (n == 258) { + /* Default Background changed. Ensure space between text area and + * window border is redrawn */ set_window_background(inst); + draw_backing_rect(inst); + gtk_widget_queue_draw(inst->area); + } } void palette_reset(void *frontend) @@ -1445,7 +1450,13 @@ void palette_reset(void *frontend) inst->cfg.colours[i][1], inst->cfg.colours[i][2]); } + /* Since Default Background may have changed, ensure that space + * between text area and window border is refreshed. */ set_window_background(inst); + if (inst->area) { + draw_backing_rect(inst); + gtk_widget_queue_draw(inst->area); + } } /* Ensure that all the cut buffers exist - according to the ICCCM, we must