[haiku-development] Re: Disable screensaver?

  • From: "Ryan Leavengood" <leavengood@xxxxxxxxx>
  • To: haiku-development@xxxxxxxxxxxxx
  • Date: Mon, 3 Nov 2008 12:17:09 -0500

On Sun, Nov 2, 2008 at 12:50 PM, François Revol <revol@xxxxxxx> wrote:
> That could also be new BRoster::StartWatching() flags or a separate
> power daemon roster...
> That needs some more housekeeping, but an app might not want to always
> be notified.

True. Though considering how infrequent power management events are,
maybe it isn't so terrible to just broadcast the power management
messages to all applications. By having a default handler that just
ignores those messages in BApplication's MessageReceived we ensure
that apps which don't care about those events don't accidentally cause
them to be canceled, like the shutdown case.

> It's how system shutdown is handled already...
> apps are notified the system is going down, and can cancel shutdown.

Yeah I was thinking of that a bit when I had the idea for the power
management messages.

> (some ported apps have issues on that though, like vlc and firefox
> which always stop the shutdown process).

Is that maybe because the registrar just sends B_QUIT_REQUESTED with
an added _shutdown boolean parameter? The "dumber" non-native apps
don't check for that parameter and so invoke their usual QuitRequested
functionality, which probably requires user interaction.

With the power management system we could define new messages and just
ignore them by default in BApplication, as described above. The
"canceling" of the screensaver or whatever would require an active


Other related posts: