Handling expose events (not working so well).