-#ifdef GDK_WINDOWING_X11
-/* Get the X Window between child and the root window.
- This should usually be the WM managed XID */
-static Window wxGetTopmostWindowX11(Display *dpy, Window child)
-{
- Window root, parent;
- Window* children;
- unsigned int nchildren;
-
- XQueryTree(dpy, child, &root, &parent, &children, &nchildren);
- XFree(children);
-
- while (parent != root) {
- child = parent;
- XQueryTree(dpy, child, &root, &parent, &children, &nchildren);
- XFree(children);
- }
-
- return child;
-}
-#endif // GDK_WINDOWING_X11
-