Andy Piper <andy(a)xemacs.org> writes:
Basically the problem is that if you click on a widget in a buffer
(e.g. a
PushButton) the widget gets the keyboard focus and never gives it back -
even if I switch frames and then back again.
Clicking on (or just entering) a push button shouldn't even grab the
keyboard focus. On the other hand, for textual subwidgets, the two policies
are acceptable: either you get keyboard focus when entering the widget's
window, in which case leaving the window should give you back the old keyboard
focus, or you have to click in the widget to get keyboard events. But then,
you'll have to click back outside.
Is the Input focus different to the Keyboard focus under X?
Yes. Under X, the keyboard is always attached to a window (possibly
the root window). This window is said to be the focus window. However, this
does not mean that this window will receive keyboard events. If for example
XtSetKeyboardFocus has been called, the keyboard events could be remaped to go
to a child of the focus window.
What does XEmacs assume about the keyboard focus?
I don't know, and I don't have time to investigate, sorry. Try to
figure out if/how XSetInputFocus is used. It's possible that somewhere in the
code, a click on a widget leads to calling XtSetKeyboardFocus, but never
release it. 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.
--
/ / _ _ Didier Verna
http://www.inf.enst.fr/~verna/
- / / - / / /_/ / ENST, INFRES C201.1 mailto:vernaļ¼ inf.enst.fr
/_/ / /_/ / /__ / 46 rue Barrault Tel. +33 (1) 45 81 73 46
75013 Paris, France Fax. +33 (1) 45 81 31 19