window selection now gives proper position and size