Hello all, I'm new to X window programming, so maybe my problem is very simple for many of you. The problem is: I have a "stack" of apps running on top of the X. None of them are "stay on top". Let's say the following windows are on the system:
desktop, x1, x2, ....., xn >From the xi window I want to find the main window of the app bellow xi ( let's say xi-1) and to give it the focus. My attempt was: int root; int parent; unsigned int nchildren; int* children; Display* d; d = XOpenDisplay(""); int w = XDefaultRootWindow(d); //w should be the desktop int ret = XQueryTree(d, w, (Window*)&root, (Window*)&parent, (Window**)&children, &nchildren ); I have the ID of my window and I want to find which is the window imediately bellow it. Following the man of XQueryTree I thought the IDs are from bottom to top but I'm not sure the list is "sorted" from the point of view of "Z" order. so, my need is ID_bellow_me = Some_Func_To_Find_The_ID(); and then, XSetInputFocus( d, ID_bellow_me, RevertToNone, CurrentTime ); XFree( children ); XCloseDisplay(d); Thanks for your help, Eugen _______________________________________________ Devel mailing list [EMAIL PROTECTED] http://XFree86.Org/mailman/listinfo/devel