changes for SizeToContent
handle SizeToContent from associated window