28 Jan
2008
28 Jan
'08
6:46 p.m.
On Jan 28, 2008, at 8:25 AM, Hamish Allan wrote:
You might try listening for distributed notifications associated with shutdown and restart:
com.apple.restartInitiated com.apple.shutdownInitiated com.apple.logoutCancelled
I imagine you would also be able to determine whether the Quit event came from user interaction with your own menus or was an AppleEvent sent by the system. If not through Cocoa directly, then possibly through a CGEventTap.