Responding to application-level events