Here's a patch to get textf/test8 working again.
Some of the diffs are just to trim down lines that
had been padded with spaces out to 112 columns. I'm
not sure if that aspect of the patch will survive the
mail process intact.
- Steve
*** lesstif-0.91.8/lib/Xm/TextF.c.orig Thu Aug 24 05:04:09 2000
--- lesstif-0.91.8/lib/Xm/TextF.c Tue Sep 12 16:13:34 2000
***************
*** 774,785 ****
XGCValues values;
XtGCMask mask, dynamic, dontcare;
! if (TextF_DrawGC(w)) {
! #ifdef USE_SHARED_GC
! XtReleaseGC((Widget)w, TextF_DrawGC(w));
! #else
! XFreeGC(XtDisplay(w), TextF_DrawGC(w));
! #endif
}
/*
--- 774,785 ----
XGCValues values;
XtGCMask mask, dynamic, dontcare;
! if (TextF_DrawGC(w)) {
! #ifdef USE_SHARED_GC
! XtReleaseGC((Widget)w, TextF_DrawGC(w));
! #else
! XFreeGC(XtDisplay(w), TextF_DrawGC(w));
! #endif
}
/*
***************
*** 1197,1202 ****
--- 1197,1204 ----
/* Use DrawGC as a flag to see if the GCs have been created */
TextF_DrawGC(w) = NULL;
+ TextF_CursorGC(w) = NULL;
+ TextF_CopyGC(w) = NULL;
/* initialize default DropSite */
import_target[0] = XmInternAtom(XtDisplay(tnew), _XA_COMPOUND_TEXT, False);
***************
*** 1248,1259 ****
TextF_TimerId(aw) = 0;
}
! #ifdef USE_SHARED_GC
! XtReleaseGC((Widget)w, TextF_DrawGC(w));
! XtReleaseGC((Widget)w, TextF_CursorGC(w));
! #else
! XFreeGC(XtDisplay(w), TextF_DrawGC(w));
! XFreeGC(XtDisplay(w), TextF_CursorGC(w));
#endif
XtReleaseGC((Widget)w, TextF_CopyGC(w));
--- 1250,1261 ----
TextF_TimerId(aw) = 0;
}
! #ifdef USE_SHARED_GC
! XtReleaseGC((Widget)w, TextF_DrawGC(w));
! XtReleaseGC((Widget)w, TextF_CursorGC(w));
! #else
! if (TextF_DrawGC(w)) XFreeGC(XtDisplay(w), TextF_DrawGC(w));
! if (TextF_CursorGC(w)) XFreeGC(XtDisplay(w), TextF_CursorGC(w));
#endif
XtReleaseGC((Widget)w, TextF_CopyGC(w));
***************
*** 1376,1387 ****
if (XtIsRealized(w) && (Prim_Foreground(w) != Prim_Foreground(new_w) ||
XtBackground(w) != XtBackground(new_w)))
{
! #ifdef USE_SHARED_GC
! XtReleaseGC((Widget)w, TextF_DrawGC(w));
! XtReleaseGC((Widget)w, TextF_CursorGC(w));
! #else
! XFreeGC(XtDisplay(w), TextF_DrawGC(w));
! XFreeGC(XtDisplay(w), TextF_CursorGC(w));
#endif
XtReleaseGC((Widget)w, TextF_CopyGC(w));
--- 1378,1389 ----
if (XtIsRealized(w) && (Prim_Foreground(w) != Prim_Foreground(new_w) ||
XtBackground(w) != XtBackground(new_w)))
{
! #ifdef USE_SHARED_GC
! XtReleaseGC((Widget)w, TextF_DrawGC(w));
! XtReleaseGC((Widget)w, TextF_CursorGC(w));
! #else
! XFreeGC(XtDisplay(w), TextF_DrawGC(w));
! XFreeGC(XtDisplay(w), TextF_CursorGC(w));
#endif
XtReleaseGC((Widget)w, TextF_CopyGC(w));
--== Sent via Deja.com http://www.deja.com/ ==--
Before you buy.