Path: utzoo!utgpu!news-server.csri.toronto.edu!rpi!zaphod.mps.ohio-state.edu!tut.cis.ohio-state.edu!ucbvax!alfalfa.com!nazgul From: nazgul@alfalfa.com (Information Junkie) Newsgroups: comp.windows.x.motif Subject: Re: Re: XmStringGetLtoR and Loss of Keyboard Focus Message-ID: <910401033335.6739@sun> Date: 1 Apr 91 08:33:35 GMT References: <110630039@hpcvlx.cv.hp.com> Sender: daemon@ucbvax.BERKELEY.EDU Distribution: inet Organization: The Internet Lines: 43 > I think this problem is caused by the inability of the Xt passive grab > routines (Xt[Un]Grab[Key,Button]) to always tell when a grab has been > released. The Xm menu accelerators are layered on top of the Xt passiv ... > this isn't good enough. There are at least two situations where Xt > currently misses grab releases and therefore merrily continues to enforce > the grab. In your situation it would cause events to continue to be forwarded > to the hierarchy that you had unmapped. > > The first is when the grab window becomes unviewable (it or one of its > ancestors is unmapped). The server will release the grab but Xt would Well that pretty much sums up the case where I'm reusing windows. I can't stop doing that (performance would be abysmal) ... > That is the second problem area. While the server sees all events on all > windows :-), the client has to explicitly request events. If the keyrelease > were to occur in a window that doesn't have release interest Xt will > never see it and will be unable to recognize that the grab has been released. This is probably the thing I fixed by doing an explicit unrelease everytime I unmap a window? > These are both problems with the Xt implementation of passive grabs. One > way that we found to avoid this problem is to always specify the menu > accelerators and mnenomics as being activated on the release rather than > the press. You can even argue that this is more compatable with the way I've switched to doing this now. I haven't tested it enough to see if the problem goes away. This still leaves one question in my mind. This explains why the accelerators go to the old window. And it explains why the traversal translations don't work (they're all defined on the down transition - not much I can do about that). What it doesn't explain is why the new window often comes up with no widget showing the keyboard focus indicator. And even with the accelerators work, I can't tab or do anything to make the focus visible. Where'd it go? Alfalfa Software, Inc. | Poste: The EMail for Unix nazgul@alfalfa.com | Send Anything... Anywhere 617/646-7703 (voice/fax) | info@alfalfa.com I'm not sure which upsets me more: that people are so unwilling to accept responsibility for their own actions, or that they are so eager to regulate everyone else's.