Is there an event fired when screensaver starts? Like for keychain locking:
OSStatus keychain_locked(SecKeychainEvent keychainEvent, SecKeychainCallbackInfo *info, void *context){...}
Finally found it — the solution is to use NSDistributedNotificationCenter and observe folowing events
Like
[[NSDistributedNotificationCenter defaultCenter]
addObserver:self
selector:@selector(screensaverStarted:)
name:@"com.apple.screensaver.didstart"
object:nil];