ctwin now handles varying window size