summaryrefslogtreecommitdiffstats
path: root/graphics/tclblt/patches/03-fedora-patch-2.patch
diff options
context:
space:
mode:
Diffstat (limited to 'graphics/tclblt/patches/03-fedora-patch-2.patch')
-rw-r--r--graphics/tclblt/patches/03-fedora-patch-2.patch43
1 files changed, 43 insertions, 0 deletions
diff --git a/graphics/tclblt/patches/03-fedora-patch-2.patch b/graphics/tclblt/patches/03-fedora-patch-2.patch
new file mode 100644
index 0000000000..cc79cb5175
--- /dev/null
+++ b/graphics/tclblt/patches/03-fedora-patch-2.patch
@@ -0,0 +1,43 @@
+ * Apply 3 changes based on revisions developed by the fedora linux team.
+ --> + 03-fedora-patch-2.diff
+ + 04-fedora-tk8.5.6.patch.diff
+ + 05-tk8.5-zoomstack.diff
+ * Those patches are required to solve segmentation faults that are observed
+ when blt is used with tcltk 8.5. We have a substantial amount of
+ experience using this patched version of blt in the Swarm
+ Simulation System (www.swarm.org) and have observed no ill-effects.
+Author: Paul E. Johnson (Debian Packaging) <pauljohn32@freefaculty.org>
+
+--- a/generic/bltGrElem.c
++++ b/generic/bltGrElem.c
+@@ -1664,6 +1664,7 @@
+ ClosestSearch search;
+ int i, x, y;
+ int flags = TCL_LEAVE_ERR_MSG;
++ int found;
+
+ if (graphPtr->flags & RESET_AXES) {
+ Blt_ResetAxes(graphPtr);
+@@ -1708,12 +1709,21 @@
+ search.dist = (double)(search.halo + 1);
+
+ if (i < argc) {
++ Blt_ChainLink *linkPtr;
+
+ for ( /* empty */ ; i < argc; i++) {
+ if (NameToElement(graphPtr, argv[i], &elemPtr) != TCL_OK) {
+ return TCL_ERROR; /* Can't find named element */
+ }
+- if (elemPtr->hidden) {
++ found = FALSE;
++ for (linkPtr = Blt_ChainFirstLink(graphPtr->elements.displayList);
++ linkPtr == NULL; linkPtr = Blt_ChainNextLink(linkPtr)) {
++ if (elemPtr == Blt_ChainGetValue(linkPtr)) {
++ found = TRUE;
++ break;
++ }
++ }
++ if ((!found) || (elemPtr->hidden)) {
+ Tcl_AppendResult(interp, "element \"", argv[i],
+ "\" is hidden", (char *)NULL);
+ return TCL_ERROR; /* Element isn't visible */