For healtha nd safety issues like the window, use the "repair and deduct" remedy, as per the article linked below.
Disclaimer: Please note that this answer does not constitute legal advice, and should not be relied on, since each state has different laws, each situation is fact specific, and it is impossible to evaluate a legal problem without a comprehensive consultation and review of all the facts and documents at issue. This answer does not create an attorney-client relationship.
An apartment must be in habitable condition, and anything relating to the health and safety of the tenant is included.
I believe that having working windows is clearly intended to be included in this requirement, because of the elements, cold, rain, heat, could affect you if you couldn't open or close the window.
I would write a demand letter to the landlord and give him a reasonable time to fix the window. Since this is a health, safety issue, a few days, perhaps 5 is sufficient (30 days is usually the amount of time to repair). If the landlord does not fix it, you may hire someone to do it and deduct the cost of this from the rent.
I am pretty sure that you are allowed to do this only twice in a year and only up to one month's rent, but I would check with the city that you are living in for a more accurate description of what you are allowed to do. Each city is different.
Do not withhold rent until and unless you have followed this "repair or deduct" requirement.
You could write an email reminding your landlord of this law and perhaps if you use the internet you can find links to the requirement for your city.
This answer is intended for educational purposes only. If you desire legal advice, please contact an attorney of your choosing.