This function returns the window's status.
If the window is open on the display the return value is 1. Otherwise the function returns 0.