Better, usually, to leave the cockpit sealed and increase cabin alt (or depressurise completely) and use the outflow valve to do what it does best ...
How can you open the window without depressurizing. You have hundreds of pounds of pressure, holding the window shut.