new_window: only set $window and pass `-n` if a name is provided

This reverts 411736c.