[3ddesktop-dev] Re: Losing keyboard focus problem
- From: Brad Wasson <bwasson@xxxxxxxxxx>
- To: "Jeff Buck" <3ddesktop-dev@xxxxxxxxxxxxx>, jeffb@xxxxxxxx
- Date: Mon, 27 May 2002 23:05:43 -0400
Jeff,
Alright I think I have a solution to the keyboard grab problem.
It looks like XGrabKeyboard sometimes fails with a return of
"AlreadyGrabbed" meaning, I can only assume, some other app
has it already grabbed ... :)
When XGrabKeyboard fails, XGrabPointer usually does too with
"GrabFrozen".
Anyway it would seem the best I could come up with is your
proposed "guess #1" which would be a retry loop. The
XGrabKeyboard call is eventually successful (I guess after
whomever releases the lock).
Anyway, I have put up a tarball for you to give a whirl if
you are so inclined:
http://www.systemtoolbox.com/bard/3ddesktop/dl/3ddesktop-0.1.7pre2.tar.gz
let me know if the problem goes away with that or not.
(btw there are some other changes in that so some other bugs
may possibly pop up)
regards,
--brad
Jeff Buck wrote:
>
> On Fri, 2002-05-24 at 07:38, Brad Wasson wrote:
> >
> > Wow! That is great! With that information I am able to
> > pretty consistently reproduce. It seems to happen also esp.
> > when I move the mouse at keypress time.
> >
> > I spent a little time last nite trying different things
> > with XGrabKeyboard and XGrabPointer. The GrabModeSync
> > has the effect of blocking the keyboard or pointer events
> > (depending on which arg) until the program ends and that
> > is not at all what we want. So its something else but
> > good suggestion.
>
> Well, I did say that I couldn't program my way out of a paper
> bag didn't I? ;)..
>
> Something strange that happened to me last night when I was testing
> the"fix" of using --texturesize=512... When I used the --fastest
> switch, that seemed to have the opposite of the expected result. It
> went _really_ slow. That copy was a pre-patch version though, so
> I wouldn't worry about it, especially since that same switch on my other
> box works exactly like you'd expect. I dropped the switch, and my home
> box seems very happy with life now ;)..
>
> Thanx for all your hard work, and the kick-ass program.
>
> -Jeff
>
________________________________________________
Get your own "800" number
Voicemail, fax, email, and a lot more
http://www.ureach.com/reg/tag
Other related posts: