Window focus on X11: check if window is viewable