window.h: Imported updates from jb-mr1.1-release