Merge "Add hasWindow field for window agent"