windows: clean research code to detect change of size