get windowposition using drawable and display

dragoran dragoran at
Sun Aug 6 09:02:26 PDT 2006

Is it possible to query the position of a window when only the display 
and drawable are known?
(this should be done inside a glxSwapbuffers wrapper)
Window win;
unsigned int x, y, width, height, border, depth;
XGetGeometry(dpy, drawable, &win, &x, &y, &width, &height, &border, &depth);
printf("%dx%d (%d, %d)\n", width, height, x, y);
prints 0 and 0 for x,y on one sys and segfaults on a other sys...
can the parent window of a drawable be queried somehow?

More information about the xorg mailing list