"Function to check whether the window is held or not." . . . .