window layout and update after mouse events