Deactivate window on keyboard leave

Change-Id: I39ead19962c69c2c4943437ca3e21315e7779385
Reviewed-by: Jørgen Lind <jorgen.lind@digia.com>