[haiku-development] Re: A few questions about the Haiku API

  • From: Axel Dörfler <axeld@xxxxxxxxxxxxxxxx>
  • To: haiku-development@xxxxxxxxxxxxx
  • Date: Wed, 06 Jun 2012 23:17:39 +0200

On 06.06.2012 14:41, Rene Gollent wrote:
On Wed, Jun 6, 2012 at 6:25 AM, Stephan Aßmus<superstippi@xxxxxx>  wrote:
I am pretty sure I do this all the time. I have the suspicion that you are
simply dead-locking by trying to quit the settings window. Just don't do
anything, the BApplication will already take care to quit all child windows
that are still present when BApplication::Quit() runs.
Nope, if any window returns false from QuitRequested(), so will
BApplication::QuitRequested(), which will consequently cause the
registrar to cancel the shutdown process. Vision used to have a
similar problem years ago. I suppose you might be able to get around
that by overriding BApplication::QuitRequested() and explicitly
quitting that particular window without asking nicely though.

Another option is to check whether the system is shutting down in QuitRequested(). IIRC Haiku sets a special field to the message that you can get with CurrentMessage() from there.

Bye,
   Axel.

Other related posts: