slackbuilds_ponce/graphics/tclblt/patches/03-fedora-patch-2.patch
Andrey M. Lipaev 377171575b graphics/tclblt: Added (Tcl/Tk Extension).
Signed-off-by: Willy Sudiarto Raharjo <willysr@slackbuilds.org>
2019-06-29 07:59:18 +07:00

43 lines
1.5 KiB
Diff

* 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 */