fix seldom window-selection changes