Add add a function to detect whether the window demands attention using X11 calls.