[haiku-appserver] Re: [Haiku-commits] r12082 - haiku/trunk/src/kits/interface

  • From: Adi Oanca <adioanca@xxxxxxxxxxxxx>
  • To: haiku-appserver@xxxxxxxxxxxxx
  • Date: Mon, 28 Mar 2005 09:25:34 +0300

Hi Michael,

Michael Lotz at BerliOS wrote:
> +// TODO: This here is a nearly full code duplication to BLooper::task_loop
> +// but with one little difference: It uses the determine_target function
> +// to tell what the later target of a message will be, if no explicit target
> +// is supplied. This is important because we need to call the right targets
> +// MessageFilter. For B_KEY_DOWN messages for example, not the BWindow but 
> the
> +// focus view will be the target of the message. This means that also the
> +// focus views MessageFilters have to be checked before DispatchMessage and
> +// not the ones of this BWindow.

> +     // TODO: this is mostly guessed; check for correctness.
> +     // I think this function is used to determine if a BView will be
> +     // the target of a message. This is used in the BLooper::task_loop
> +     // to determine what BHandler will dispatch the message and what filters
> +     // should be checked before doing so.

        I'm afraid you have to undo your changes.
        For B_KEY_DOWN, BWindow will first handle this message in 
DispatchMessage to intercept TAB, SHIFT+TAB, OPTION+TAB, etc keystrokes 
to that it would advance to the next focus item/group. It is after that 
check that it calls fFocus->KeyDown(); Same goes for the menu and 
DefaultButton.

        If B_NULL_TOKEN is specified BLooper/BWindow needs to take care of the 
message.


bye,
Adi.

Other related posts: