diff options
author | jan.nijtmans <nijtmans@users.sourceforge.net> | 2020-08-04 10:23:17 (GMT) |
---|---|---|
committer | jan.nijtmans <nijtmans@users.sourceforge.net> | 2020-08-04 10:23:17 (GMT) |
commit | 82fa36590eab7415072e7d56195fca78277676c7 (patch) | |
tree | 7e8c17e1fa8de47ca37769571b35880869a373a9 /generic | |
parent | 50092ff480b5a538c303cc781bf30505d4c2ba08 (diff) | |
parent | 35b2870cff97386ce7ea956ee317bec123017d52 (diff) | |
download | tk-82fa36590eab7415072e7d56195fca78277676c7.zip tk-82fa36590eab7415072e7d56195fca78277676c7.tar.gz tk-82fa36590eab7415072e7d56195fca78277676c7.tar.bz2 |
Merge 8.6
Diffstat (limited to 'generic')
-rw-r--r-- | generic/tkCmds.c | 16 | ||||
-rw-r--r-- | generic/tkTest.c | 2 |
2 files changed, 17 insertions, 1 deletions
diff --git a/generic/tkCmds.c b/generic/tkCmds.c index c9026ef..6a06185 100644 --- a/generic/tkCmds.c +++ b/generic/tkCmds.c @@ -1741,7 +1741,23 @@ Tk_WinfoObjCmd( if (TkGetWindowFromObj(interp, tkwin, objv[2], &tkwin) != TCL_OK) { return TCL_ERROR; } +#ifdef TK_HAS_DYNAMIC_COLORS + + /* + * Make sure that the TkColor used for the winfo rgb command is + * destroyed when we are through with it, so we do not get stale RGB + * values next time. + */ + + { + Colormap temp = Tk_Colormap(tkwin); + Tk_Colormap(tkwin) = TK_DYNAMIC_COLORMAP; + colorPtr = Tk_GetColor(interp, tkwin, Tcl_GetString(objv[3])); + Tk_Colormap(tkwin) = temp; + } +#else colorPtr = Tk_GetColor(interp, tkwin, Tcl_GetString(objv[3])); +#endif if (colorPtr == NULL) { return TCL_ERROR; } diff --git a/generic/tkTest.c b/generic/tkTest.c index b104f13..b4f1fad 100644 --- a/generic/tkTest.c +++ b/generic/tkTest.c @@ -1601,7 +1601,7 @@ ImageDisplay( * Drawing is not possible on the first call to DisplayImage. * Save the message, but do not log it until the actual display. */ - + if (instPtr->displayFailed == False) { sprintf(instPtr->buffer, "%s display %d %d %d %d", instPtr->masterPtr->imageName, imageX, imageY, width, height); |