>>>>> On Sat, 15 Jul 2000 21:34:35 +0100, Martin Simmons <[EMAIL PROTECTED]> said:
>>>>> On Fri, 14 Jul 2000 16:39:52 -0400, "Mitch Miers" <[EMAIL PROTECTED]>
>said:
Mitch> So, while XmIsDialogShell(w) will always be true,
Mitch> wc may or may not be == xmDialogShellWidgetClass. See what
Mitch> I mean? It depends on the wind up. The check needs to be
Mitch> done so that the Realize callback isn't called twice. Just
Mitch> using !XmIsDialogShell(w) means that it will *never* be called.
Martin> Yes, sorry, I was being dense not seeing that wc changes.
Martin> Since VSEP_RealizeCallback needs a specific class, why not check for
Martin> XmIsVendorShellExt(ext->widget)?
Ignore that, since it obviously doesn't prevent duplicate calls. Doh!
However, any test that checks for something *not* being DialogShell seems like
it would only filter out one of the possible duplicates in the general case
(though it might cover all the cases in Lesstif at the moment).
Perhaps the following is better, only doing the callback for the widget at the
"correct" depth:
===================================================================
RCS file: /cvsroot/hungry/lesstif/lib/Xm/BaseClass.c,v
retrieving revision 1.14
diff -u -r1.14 BaseClass.c
--- BaseClass.c 2000/07/07 00:50:28 1.14
+++ BaseClass.c 2000/07/19 16:04:40
@@ -1201,7 +1201,7 @@
ext = _XmGetWidgetExtData(w, XmSHELL_EXTENSION);
- if (ext != NULL && ext->widget != NULL && !XmIsDialogShell(w))
+ if (ext != NULL && ext->widget != NULL && RealizeDepth(XtClass(w)) ==
+IntentedWrapperDepth)
{
/*
* Check for a callback list to be executed (the only exception
__Martin