diff options
Diffstat (limited to 'generic/tkZinc.c')
-rw-r--r-- | generic/tkZinc.c | 18 |
1 files changed, 16 insertions, 2 deletions
diff --git a/generic/tkZinc.c b/generic/tkZinc.c index b754a7b..f4c1394 100644 --- a/generic/tkZinc.c +++ b/generic/tkZinc.c @@ -428,6 +428,7 @@ ZincObjCmd(ClientData client_data, /* Main window associated with wi->realized = False; wi->update_pending = 0; wi->fore_color = NULL; + wi->fore_gradient = NULL; wi->back_color = NULL; wi->relief_grad = NULL; wi->bbox_color = NULL; @@ -4219,7 +4220,16 @@ Configure(Tcl_Interp *interp,/* Used for error reporting. */ if (wi->pick_aperture < 0) { wi->pick_aperture = 0; } - + if (CONFIG_PROBE(FORE_COLOR_SPEC) || !wi->fore_gradient) { + /* + * Update the default gradient. + */ + if (wi->fore_gradient) { + ZnFreeGradient(wi->fore_gradient); + } + wi->fore_gradient = ZnGetGradient(wi->interp, wi->win, + ZnNameOfColor(wi->fore_color)); + } if (CONFIG_PROBE(BACK_COLOR_SPEC) || !wi->relief_grad) { Tk_SetWindowBackground(wi->win, ZnPixel(wi->back_color)); if (wi->relief_grad) { @@ -5355,7 +5365,11 @@ Destroy(char *mem_ptr) /* Info about the widget. */ XFree(wi->gl_visual); } #endif - + + if (wi->fore_gradient) { + ZnFreeGradient(wi->fore_gradient); + } + Tcl_DeleteTimerHandler(wi->blink_handler); Tk_FreeOptions(config_specs, (char *) wi, wi->dpy, 0); |