> > Ryan Leavengood wrote: > > I think in general what Stephan described is good, though I would > > suggest > > we keep it as simple as possible: > > > > 1. As part of their app flags (or whatever else would be easily > > queryable) each application that cares about power management > > events can > > indicate it wants to be notified about power management changes. 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. > > 2. When a power management event occurs (turn screensaver on, turn > > harddrive off, put machine to sleep), each of those applications > > can be > > sent messages indicating the new event. If any respond negatively, > > the > > event is canceled. It's how system shutdown is handled already... apps are notified the system is going down, and can cancel shutdown. (some ported apps have issues on that though, like vlc and firefox which always stop the shutdown process). François.