At 11:48 AM 6/23/99 +0200, Didier Verna wrote:
I beleive that if you call XtSetKeyboardFocus with a widget of
`None',
the keyboard focus will be switched back to the toplevel of the tree.
This didn't work, but calling lw_set_keyboard_focus() with the shell and
text widgets did the trick. I have had to put a call to this in
handle_focus_event_1 and that works ok.
> >Also, if you have to track when the pointer leaves a
subwidget in
> >order to restore the focus, you'll have to select the LeaveNotify events.
Unfortunately LeaveNotify only seems to apply to mouse motion. In addition
I get a FocusOut when the widget gets selected but no FocusIn when I click
back in the frame. Putting an extra call to handle_focus_event_1 in the
ButtonPress code does the trick.
Not sure whether this is the right solution. It is very similar to what I
did for mswindows and seems to work.
Thanks for your help, I should have a patch out in time for b18.
andy
--------------------------------------------------------------
Dr Andy Piper
Senior Consultant Architect, BEA Systems Ltd