Restore input handling from X