compositor: fix resetting the keyboard focus after a tty switch