summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authornijtmans <nijtmans>2010-01-18 21:20:09 (GMT)
committernijtmans <nijtmans>2010-01-18 21:20:09 (GMT)
commite06c38d5e7dffdd9153afbd4c7c976de5167ca68 (patch)
tree88e6d61c5ac9518a90a4e3a815121131c24bd7a9
parent14f741723a3016c1d616acf22f253a0d6aecc03b (diff)
downloadtk-e06c38d5e7dffdd9153afbd4c7c976de5167ca68.zip
tk-e06c38d5e7dffdd9153afbd4c7c976de5167ca68.tar.gz
tk-e06c38d5e7dffdd9153afbd4c7c976de5167ca68.tar.bz2
Apply patch [#2932808]: Canvas items
not updating on widget state change
-rw-r--r--ChangeLog5
-rw-r--r--generic/tkCanvas.c24
2 files changed, 28 insertions, 1 deletions
diff --git a/ChangeLog b/ChangeLog
index ec407ff..8311038 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,8 @@
+2010-01-18 Jan Nijtmans <nijtmans@users.sf.net>
+
+ * generic/tkCanvas.c Apply patch [#2932808 ]: Canvas items
+ not updating on widget state change
+
2010-01-09 Pat Thoyts <patthoyts@users.sourceforge.net>
* doc/menu.n: [TIP 360]: Remove special handling of
diff --git a/generic/tkCanvas.c b/generic/tkCanvas.c
index ca48d87..eed2d5a 100644
--- a/generic/tkCanvas.c
+++ b/generic/tkCanvas.c
@@ -12,7 +12,7 @@
* See the file "license.terms" for information on usage and redistribution of
* this file, and for a DISCLAIMER OF ALL WARRANTIES.
*
- * RCS: @(#) $Id: tkCanvas.c,v 1.46.2.2 2008/10/11 06:55:03 dkf Exp $
+ * RCS: @(#) $Id: tkCanvas.c,v 1.46.2.3 2010/01/18 21:20:09 nijtmans Exp $
*/
/* #define USE_OLD_TAG_SEARCH 1 */
@@ -1886,6 +1886,7 @@ ConfigureCanvas(
{
XGCValues gcValues;
GC newGC;
+ Tk_State old_canvas_state=canvasPtr->canvas_state;
if (Tk_ConfigureWidget(interp, canvasPtr->tkwin, configSpecs,
objc, (CONST char **) objv, (char *) canvasPtr,
@@ -1916,6 +1917,27 @@ ConfigureCanvas(
canvasPtr->pixmapGC = newGC;
/*
+ * Reconfigure items to reflect changed state disabled/normal.
+ */
+
+ if ( old_canvas_state != canvasPtr->canvas_state ) {
+ Tk_Item *itemPtr;
+ int result;
+
+ for ( itemPtr = canvasPtr->firstItemPtr; itemPtr != NULL;
+ itemPtr = itemPtr->nextPtr) {
+ if ( itemPtr->state == TK_STATE_NULL ) {
+ result = (*itemPtr->typePtr->configProc)(canvasPtr->interp,
+ (Tk_Canvas) canvasPtr, itemPtr, 0, NULL,
+ TK_CONFIG_ARGV_ONLY);
+ if (result != TCL_OK) {
+ Tcl_ResetResult(canvasPtr->interp);
+ }
+ }
+ }
+ }
+
+ /*
* Reset the desired dimensions for the window.
*/