Added display changing detection.