I discovered that is possible to land in _XmPopupButtonPressHandler
with a deleted widget. I think the reason is that the RowColumn
destroy function does not clear the EventHandler that was added by
AddPopupHandlers. The following patch should fix the problem.
I'm also having the problem that the popup menus appear at the top left
corner of the screen, probably at 0,0. I didn't try to fix that one.
- Steve
*** lesstif-0.91.3/lib/Xm/RowColumn.c.orig Mon Apr 17 21:58:06 2000
--- lesstif-0.91.3/lib/Xm/RowColumn.c Mon Jul 24 12:21:06 2000
***************
*** 1056,1061 ****
--- 1056,1083 ----
static void
destroy(Widget w)
{
+ if (RC_Type(w) == XmMENU_POPUP)
+ {
+ Widget realpar = NULL;
+
+ if (XtIsShell(XtParent(w)))
+ {
+ realpar = XtParent(XtParent(w));
+ }
+ else
+ {
+ realpar = XtParent(w);
+ }
+
+ if (realpar != NULL)
+ {
+ XtRemoveEventHandler(realpar,
+ ButtonPressMask|ButtonReleaseMask,
+ False, _XmPopupButtonPressHandler,
+ (XtPointer)w );
+ }
+ }
+
if (RC_Boxes(w))
{
XtFree((XtPointer)RC_Boxes(w));
--== Sent via Deja.com http://www.deja.com/ ==--
Before you buy.