[haiku-3rdparty-dev] Re: Focus of new window

  • From: Rene Gollent <anevilyak@xxxxxxxxx>
  • To: haiku-3rdparty-dev@xxxxxxxxxxxxx
  • Date: Sun, 16 Jun 2013 12:57:32 -0400

On 6/14/13, Matthew Allen <fret@xxxxxxxxxxxx> wrote:
> When a new window is openned, but no child view has the focus yet. Where do
> the key presses go?

The window receives the corresponding B_KEY_{DOWN,UP} messages, but if
there's no focus view, they get discarded. Those could be intercepted
via either DispatchMessage() as mentioned the other day, or by
attaching a BMessageFilter to the window.

> Or do I just _have_ to set the focus somewhere?

Yes.

Regards,

Rene

Other related posts: