Implement pointer crossing and window visibility events