Martin,

It has the intended effect of only calling the realize callback
once, but a more proper semantic would be
...
    && IntentedWrapperDepth == 0)

as this would mean wc == vendorShellWidgetClass given what
RealizeDepth() does.  So you could as well use that equality
check as well.

Pick a fix ;)

Mitch

> -----Original Message-----
> From: Martin Simmons [mailto:[EMAIL PROTECTED]]
> Sent: Wednesday, July 19, 2000 2:05 PM
> To: [EMAIL PROTECTED]
> Cc: [EMAIL PROTECTED]; [EMAIL PROTECTED]
> Subject: RE: lesstif-CVS bug: Broken pipe with Grace
> 
> 
> >>>>> 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
> 

Reply via email to