Welcome to the world of owning a bichon. I'd suggest restricting access to the window as well as giving the pup some better activity. It sounds like the pup is quite bored and is having a ball barking at passersby. Don't yell at the puppy or say no because he will think you are barking right along with him (what a fun puppy-owner activity!) Instead use a quick eh-eh or shhh sounds and then distract him with a toy. Make sure to use plenty of praise each time he doesn't bark at people.