On Wednesday 09 January 2002 5:54 pm, John Levon wrote: > On Wed, Jan 09, 2002 at 09:30:18AM +0000, Angus Leeming wrote: > > > > Shouldn't you rather be catching a loss of focus and closing the > > > browser by setting a callback? I'm pretty sure this can be done with > > > XForms but I've never tried. > > > > Yes, this is easy enough. Just need a pre-handler. I'll have a go. > > This focus loss thing is unreliable. I don't imagine you can catch all cases, > and more importantly, a button press outside the dropdown will actually do something > as well as close the dropdown (assuming it'll work). This is not how pop-up menus > are supposed to operate. There is no equivalent of XGrabPointer in xforms, and that > is exactly what is needed... > > I'm quite surprised you're prepared to devote this amount of time to such a silly > little thing when there are much more serious problems elsewhere !
Well, I just looked at the list of bugs assigned to me. Non of them are serious, so I just started at the beginning. Anyway, why don't you try the attached files as a drop-in replacement for those in cvs. The code does all the first steps I think. Moreover, XGrabPointer is clearly NOT working for me whilst the loss of focus does ALWAYS because I shove the mouse into the browser when it is shown. (That's not to say that xforms isn't a pain in the arse at times. This is code is a horrible mess of fudges!) Have a good evening, Angus
DropDown.C.bz2
Description: BZip2 compressed data
DropDown.h.bz2
Description: BZip2 compressed data