diff options
author | fvogel <fvogelnew1@free.fr> | 2019-01-27 14:07:08 (GMT) |
---|---|---|
committer | fvogel <fvogelnew1@free.fr> | 2019-01-27 14:07:08 (GMT) |
commit | ff7c0d39fa897fd6a7fe27ed0cb6d424311d5d83 (patch) | |
tree | 6c8a2c0380de49b20c787ac17a3b3f76fb0fabed | |
parent | 7444c05633a6dd6546d4046e238bec448eb42c9d (diff) | |
download | tk-ff7c0d39fa897fd6a7fe27ed0cb6d424311d5d83.zip tk-ff7c0d39fa897fd6a7fe27ed0cb6d424311d5d83.tar.gz tk-ff7c0d39fa897fd6a7fe27ed0cb6d424311d5d83.tar.bz2 |
Reduce the number of unixEmbed test failures on Linux from 10 to 4 by propagating changes in TkpTestembedCmd from macosx/tkMacOSXEmbed.c to the unix version of it in unix/tkUnixEmbed.c
-rw-r--r-- | unix/tkUnixEmbed.c | 22 |
1 files changed, 19 insertions, 3 deletions
diff --git a/unix/tkUnixEmbed.c b/unix/tkUnixEmbed.c index b170ad0..539cb8a 100644 --- a/unix/tkUnixEmbed.c +++ b/unix/tkUnixEmbed.c @@ -873,6 +873,7 @@ TkpTestembedCmd( Container *containerPtr; Tcl_DString dString; char buffer[50]; + Tcl_Interp *embeddedInterp = NULL, *parentInterp = NULL; ThreadSpecificData *tsdPtr = Tcl_GetThreadData(&dataKey, sizeof(ThreadSpecificData)); @@ -884,21 +885,34 @@ TkpTestembedCmd( Tcl_DStringInit(&dString); for (containerPtr = tsdPtr->firstContainerPtr; containerPtr != NULL; containerPtr = containerPtr->nextPtr) { + if (containerPtr->embeddedPtr != NULL) { + embeddedInterp = containerPtr->embeddedPtr->mainPtr->interp; + } + if (containerPtr->parentPtr != NULL) { + parentInterp = containerPtr->parentPtr->mainPtr->interp; + } + if (embeddedInterp != interp && parentInterp != interp) { + continue; + } Tcl_DStringStartSublist(&dString); + /* Parent id */ if (containerPtr->parent == None) { Tcl_DStringAppendElement(&dString, ""); } else if (all) { - sprintf(buffer, "0x%x", (int) containerPtr->parent); + sprintf(buffer, "0x%lx", (int) containerPtr->parent); Tcl_DStringAppendElement(&dString, buffer); } else { Tcl_DStringAppendElement(&dString, "XXX"); } - if (containerPtr->parentPtr == NULL) { + /* Parent pathName */ + if (containerPtr->parentPtr == NULL || + parentInterp != interp) { Tcl_DStringAppendElement(&dString, ""); } else { Tcl_DStringAppendElement(&dString, containerPtr->parentPtr->pathName); } + /* Wrapper */ if (containerPtr->wrapper == None) { Tcl_DStringAppendElement(&dString, ""); } else if (all) { @@ -907,7 +921,9 @@ TkpTestembedCmd( } else { Tcl_DStringAppendElement(&dString, "XXX"); } - if (containerPtr->embeddedPtr == NULL) { + /* Embedded window pathName */ + if (containerPtr->embeddedPtr == NULL || + embeddedInterp != interp) { Tcl_DStringAppendElement(&dString, ""); } else { Tcl_DStringAppendElement(&dString, |