Is there anyway to get a handle to when a laptop is going into suspend mode and do something before it actually goes into suspend mode?
I assume this is not easy/possible because it would be ill-advised for the power management to honor any such software that was trying to stop it from going into suspend mode.
The specific use is to have a tray app notify fogbugz to stop work when I close my laptop lid.