I see no warnings when running your sample code.


On 02-May-00 at 05:18, Kazuyuki Funada ([EMAIL PROTECTED]) wrote:
> Hi,
> 
> I found a problem related to "Gadget" and attached source code 
> is a simple example to reproduce it.
> 
> When "gpb2" is used, Lesstif makes warnings as the below and
> freeze for a while. "gpb1" does not cause the same problem.
> 
> "gpb1": call PushButton
> "gpb2": call PushButtonGadget
> 
> ---------- warnings ------------
> Warning: 
>     Name: pl
>     Class: XmRowColumn
>     Can't grab the keyboard.
>          
> Warning: 
>     Name: pl
>     Class: XmRowColumn
>     Can't grab the pointer.
> --------------------------------
> 
> It doesn't seems that Lesstif updates the translation table correctly
> when using "Gadget". Actually, translation routine for "RowColumn" is 
> called when any buttons on Dialog is pushed.
> 
> Temporary workaround is the below. But I am not sure it ensures the
> correct behavior for all of case.
> 
> -----------------------------------------------------------------------
> diff -uNr lesstif-0.90.0/lib/Xm/RowColumn.c
> lesstif-0.90.0-i18n/lib/Xm/RowColumn.c ---
> lesstif-0.90.0/lib/Xm/RowColumn.c     Sun Mar 12 18:43:05 2000 +++
> lesstif-0.90.0-i18n/lib/Xm/RowColumn.c     Sun Apr 30 14:47:19 2000 @@
> -3102,6 +3102,8 @@           MGR_HighlightedWidget(w) = gadget;
>  
>           _XmDispatchGadgetInput((Widget)gadget, event, XmARM_EVENT);
> +         _XmMenuFocus(w, XmMENU_FOCUS_SAVE, CurrentTime);
> +         return;
>       }
>      }
>      DEBUGOUT(XdbDebug("MENU", w, "_XmMenuBtnDown - %i %s\n",
> @@ -3198,6 +3200,7 @@
>       DEBUGOUT(XdbDebug2(__FILE__, w, gadget, "MenuBtnUp(in gadget)\n"));
>  
>       _XmDispatchGadgetInput((Widget)gadget, event, XmACTIVATE_EVENT);
> +     return;
>      }
>      DEBUGOUT(XdbDebug("MENU", w, "_XmMenuBtnUp - %s %s posted\n",
>           _XmGetInDragMode(w) ? "dragging" : "not-dragging",
> -------------------------------------------------------------------------
> 
> ENVIRONMENT
>   lesstif: 0.90.0
>   OS     : Linux(RedHat6.0)
>   X      : XFree86-3.3.3.1
> 
> Thanks.
> 
> --
> Kazuyuki Funada

Reply via email to