cHi, Is there any way to see if a window is obscured by I tried using XQueryTree to retreive all the windows and Anyone know a bug with XQueryTree? Thanks Steve |
|||
|
User login |
|
|
All trademarks and copyrights on this page are properties of their respective owners. The rest is copyright © Integrated Computer Solutions Inc., 2003 - 2012 |
Anonymous
Window obscured
Hello, Steve!
I am using this piece of code for similar purposes,
i.e. to check if there is any point in redrawing window
contnets after loading new file or something like that.
There are other fileds "state" structure which you might
want to check, if you want more detailed info.
Dusan Peterc
int widgetIsViewable(Widget w)
{
XWindowAttributes state;
if (XtIsRealized(w))
XGetWindowAttributes(xinfo.dpy, XtWindow(w), &state);
else
return(FALSE);
if (state.map_state==IsViewable) return(TRUE);
else return(FALSE);
}
Anonymous
Window obscured
Hi Dusan
Thanks for the info about XGetWindowAttribute
I was able to find what I needed with the following function
XGetWindowAttributes
XtWindowToWidget
XtTranslateCoords
XQueryTree
Steve
ICS_support
Window obscured
I think that what this code really does (sorry, in the absence of my reference books) is check whether the window in question is mapped and at least partially visible. To track whether the window is completely obscured, I believe that it is necessary to track the VisibilityNotify events on the window. Those give information about the "degree" of visibility of the window.
In the original question, the user described that XQueryTree is core-dumping. Remember that it returns information; see http//www.motifzone.com/resources/man/XQueryTree.html for details on the information that comes back and that should be freed.
Anonymous
Window obscured
Yes that is what it does. But by using a combination of the aboved mentionned calls I was able to get the information needed.
I sent a Q and A to Kenton Lee`s FAQ page explaining the process.