Get the window position on SDL/X11

What’s the correct way to find the topleft corner position of a SDL
window? This code returns always (0,0). I’ve also tried with instead of wmwindow and to move the lock function
just before the XMoveWindow() (that works).

SDL_SysWMinfo info;

if ( SDL_GetWMInfo(&info) > 0 ) {
if ( info.subsystem == SDL_SYSWM_X11 ) {
XWindowAttributes attrs;;

     Status rc = XGetWindowAttributes(,
       , &attrs);

if(rc) {

// at this point attrs.x and attr.y are always ZERO.

I’ve looked at the SDL X11 driver and it seems that there are at least
two windows opened, but I’m able to get only the offset of, and moving THAT window makes it clip to the window
border instead of the desktop one!