Deactivate all control states when losing focus.

Fixes #202.