window updated for handling dragging