nanogui: Thread: keyboard focus getting screwed up


[<<] [<] Page 1 of 1 [>] [>>]
Subject: keyboard focus getting screwed up
From: tj ####@####.####
Date: 19 Jun 2004 18:36:23 +0100
Message-Id: <40D47980.7030502@comcast.net>

I am having a problem concerning setting the focus for keyboard input.

I have a main app that has several windows on it and one window has a 
list of apps on it. Selecting one of those apps uses fork() & execlp() 
to launch it.

Now everything use to work OK when I used just the laucnd window in the 
parent app. The child ran and got keyboard events and when it 
terminated, control does not return to parent UNTIL child terminates, 
the keystrokes went back to teh parent's launching window. Everthything 
cool. Also, I had not used GrSetFocus() at this time.

Then I added my other windows to my parent app. Also, this is a 
pointerless device, all navigation is done by keystroke. Now, as 
direction keys cause focus to move from window to window, I had to use 
GrSetFocus() to make sure that keystroke event ids went to the right 
window.

Ok, now I launch a child and IT DOES NOT GET KEYSTROKES. They still go 
to the parent's launching window. Ok, I put a GrSetFocus() in the child 
to it's input window. That fixes that problem. But, when the child 
terminates, THE KEYSTROKES ARE NOT GETTING BACK TO LAUNCHING WINDOW! Ok, 
I try this to spawn child:
parent>fork();
child>execlp();
parent> wait(on child to terminate);
parent>GrSetFocus(wid);

So this way I set focus back to my main app window AFTER the child 
terminates.

THIS DOES NOT WORK! Still no keyboard input to the parent apps window.

I gues I do not understand focus.

Oh yea, this is bare nano-X, no nanowm

tj

[<<] [<] Page 1 of 1 [>] [>>]


Powered by ezmlm-browse 0.20.