You know those plastic carpet runners? You could put one upside down in front of the window (so the spikey things are facing up). Your pets won't want to walk on it and so it will keep them away from the window. Be sure you get one with the spikey things close together. Some of them are spaced far apart allowing cats to walk between the spikes.