Set current id when adding a new window