163) What are these passive grab warnings? When I destroy certain

widgets I get a stream of messages

    Warning: Attempt to remove non-existant passive grab


Answer: They are meaningless, and you want to ignore them.  Do this (from Kee
Hinckley) by installing an XtWarning handler that explicitly looks for them
and discards them:

        static void xtWarnCB(String message) {
           if (asi_strstr(message, "non-existant passive grab", TRUE)) return;
           ...

They come from Xt, and (W. Scott Meeks): "it's something that the designers of
Xt decided the toolkit should do. Unfortunately, Motif winds up putting
passive grabs all over the place for the menu system.  On the one hand, we
want to remove all these grabs when menus get destroyed so that they don't
leak memory; on the other hand, it's almost impossible to keep track of all
the grabs, so we have a conservative strategy of ungrabbing any place where a
grab could have been made and we don't explicitly know that there is no grab.
The unfortunate side effect is the little passive grab warning messages.
We're trying to clean these up where possible, but there are some new places
where the warning is generated.  Until we get this completely cleaned up (1.2
maybe), your best bet is probably to use a warning handler."
Go Back Up

Go To Previous

Go To Next