| This is not the answer you expected, but you don't know without extra-ordinary
efforts (XDrawPoint, XGetPixel),I think you don't know when a window is
invisible/ concealed/ obscured/ unmapped/ etc. by a resource that you don't
control.
So the answer is not impossible, but applications generally are not supposed to
care according to the X folklore.
|
|
Re: .1
This does not answer your question but it may help a little.
This will tell you when a window is obscured:
int status;
XWindowAttributes attributes;
Window window_id;
Display *display;
status = XGetWindowAttributes(display, window_id, &attributes);
if (status == 1)
{
if (attributes.map_state == IsViewable)
{
/* the window is not obscured */
}
else
{
/* the window is obscured */
}
}
|