[haiku-commits] Re: haiku: hrev43775 - src/bin/desklink

  • From: Philippe Saint-Pierre <stpere@xxxxxxxxx>
  • To: haiku-commits@xxxxxxxxxxxxx
  • Date: Sun, 4 Mar 2012 19:05:13 -0500

Hi,

On Sat, Feb 25, 2012 at 5:54 PM, Axel Dörfler <axeld@xxxxxxxxxxxxxxxx>wrote:

> On 02/23/2012 02:02 AM, stpere@xxxxxxxxx wrote:
>
>> --- a/src/bin/desklink/**VolumeWindow.cpp
>> +++ b/src/bin/desklink/**VolumeWindow.cpp
>> @@ -86,6 +86,10 @@ VolumeWindow::MessageReceived(**BMessage *msg)
>>                        } else
>>                                Quit();
>>                        break;
>> +
>> +               case B_QUIT_REQUESTED:
>> +                       Quit();
>> +                       break;
>>
>>                default:
>>                        BWindow::MessageReceived(msg);
>>
>
> That last part of the change looks completely superfluous; sending a
> window B_QUIT_REQUESTED should just call BWindow::QuitRequested(), and if
> that returns 'true', it will close the window.
> Please revert (unless I'm wrong for some reason, of course :-)).
>
> Bye,
>   Axel.
>

It seems you would be right on this, and frankly, that's the first approach
I tried/used.  However, I still didn't found why, but there is an issue.
 I'll try to explain as clearly as possible, it might ring a bell to you or
someone else.

The message (sent from the replicant to its original copy via SendReply()
in the constructor using the archive message) reaches its target, but if I
intend it to use the default case, and have QuitRequested called, it does
eventually work, but not right away.  It works as soon as another message
get sent (like moving the slider in this case).  But, since it's working in
the "ugly" version I did, it means the message reaches its target.  I'm not
quite sure why it would behave like this.. the first receipient being a
BView, and having the message sent to a BWindow then.. can the fact that
it's a reply play any role in this?

Philippe

Other related posts: