[haiku-3rdparty-dev] Re: Dispatch messages

  • From: Carlo Lanzotti <clanzotti@xxxxxxxxxxxxx>
  • To: haiku-3rdparty-dev@xxxxxxxxxxxxx
  • Date: Mon, 14 Nov 2022 13:43:51 +0100

Hi Zenja, Axel,

Thank you very much for your reply. 

Tried the solution found in the BAlert:Go, but still something is not going the 
way I expect. Now I’m able to dispatch asynchronously UpdateIfNeeded() but 
still my underlying view (a BGLView) does not receive messages. Same for the 
main window that remains locked even if the messages are supposed to be sent to 
it (can’t be maximized nor quitted with the standard title bar buttons).

Am I missing something else?

Regards,

Carlo

Il giorno 14 nov 2022, alle ore 08:08, Axel Dörfler <axeld@xxxxxxxxxxxxxxxx> 
ha scritto:

Am 13.11.2022 um 22:56 schrieb Zenja Solaja:
I understand your issue, and wont bother discussing the merrits of blocking. 
The easy way is to use the B_MODAL_WINDOW creation flag. See BAlert source 
as an example.

That's indeed a good example; BAlert::Go() does pretty much what you want. It 
waits for the window to close without suppressing window messages.

If you look at the implementation of BWindow::UpdateIfNeeded(), it looks 
pretty similar to the sample code you provided.

Bye,
  Axel.






Other related posts: