On 11.03.2007 22:59, Peter Amstutz wrote:
> On Sun, Mar 11, 2007 at 10:27:52PM +0100, res wrote:
>> I would say neither is right. "Mouse enter" and "gain focus" are two
>> distinct events, and a mouse enter generally does not cause a focus
>> change. Example: focus has an edit field, you want to type something.
>> For some reason, the mouse gets moved over the WXGL view... would you
>> want the WXGL view to take the focus? Probably not.
> 
> Well, Windows is click-to-focus, whereas X is typically 
> focus-follow-mouse, so I would say that it is a matter of taste.  But 
> you're right, another approach to this would be to catch the first 
> mouse click event and make sure it takes focus in that case.

On a focus-follow-mouse setup, wouldn't a mouse-enter implicitly cause a
focus gaining anyway?

While focus-on-click would be right it might also be unintuitive... a
user may fail to notice that some other control is focused and wonders
why keyboard input doesn't have an effect.

Do WX child windows propagate keyboard events they didn't handle to
their parent? If so you could forward keyboard events from your main
window (presumably propagated) to the 3D view.

Or maybe implement focus-on-mouse manually (via subclassing or so?), but
with some heuristic that focus is never taken from an edit box or so.

> However, in either case, having CS broadcast an event claiming to have 
> focus when it doesn't is wrong ;-)

Yes.

-f.r.

Attachment: signature.asc
Description: OpenPGP digital signature

_______________________________________________
vos-d mailing list
vos-d@interreality.org
http://www.interreality.org/cgi-bin/mailman/listinfo/vos-d

Reply via email to