resize window; proximity of A inside B