Checking TOP status of a window