SDL_CreateWindowFrom xwindow Ubuntu 20.04 has other behavior then 16.04?

I recently used SDL2 under Ubuntu 16.04 and created SDL window from native xwindow with opengl support with help of SDL_CreateWindowFrom.
The reason is that I need a transparent main window and this seemed to be the only way under Linux.
I used my code snipped (meanwhile slightly changed) which I posted here long time ago.
https://forums.libsdl.org/viewtopic.php?p=44939
All worked well so far under 16.04. but now I need to switch to 20.04.
I could compile and run my code under 20.04 but now the transparent window stays always empty and transparent and I have no idea why.
I stripped down the render loop to just draw a colored rect but it will still not be not be drawn or better it is not visible.
I checked every step within the render loop with SDL_GetError(), also creating the main window and the render reports no error. What could be the reason?

The loop looks like this as usual:

{
SDL_SetRenderDrawColor(renderer_, 0, 0, 0, 0);
SDL_RenderClear(renderer_);

// Set render color to blue
SDL_SetRenderDrawColor( renderer_, 0, 0, 255, 255 );
SDL_Rect r; r.x = 50; r.y = 50; r.w = 1000; r.h = 1000;
SDL_RenderFillRect( renderer_, &r );

SDL_RenderPresent(renderer_);
SDL_Delay(1000 / 60);
}

Strange is the following:
SDL_RendererInfo info;
SDL_GetRendererInfo(renderer_, &info);
ROS_INFO_THROTTLE(5, "%s flags:%d numtex:%d w:%d h:%d ", info.name, info.flags, info.num_texture_formats, info.max_texture_width, info.max_texture_height);
Tells me: “opengl flags:10 numtex:8 w:16384 h:16384”

but
ROS_INFO_THROTTLE(5, “Window Flags: %d”, SDL_GetWindowFlags(sdl_window_));
tells me:
Window Flags: 2058
which is: SDL_WINDOW_VULKAN instead of SDL_WINDOW_OPENGL (???)
I dont know anything about Vulkan. But could this be the reason?

The slightly changes I’ve mentioned above from the initial post is that I detect the right VisualInfo in a loop like this (same under 16.04 and 20.04)
XVisualInfo *visual;
XRenderPictFormat *pict_format;
int numfbconfigs;
GLXFBConfig *fbconfigs = glXChooseFBConfig(xdisplay_, DefaultScreen(xdisplay_), visualData, &numfbconfigs),
fbconfig = 0;

    for (int i = 0; i<numfbconfigs; i++)
    {
      visual = (XVisualInfo*) glXGetVisualFromFBConfig(xdisplay_, fbconfigs[i]);
      if(!visual)
        continue;

      pict_format = XRenderFindVisualFormat(xdisplay_, visual->visual);
      if(!pict_format)
        continue;

      fbconfig = fbconfigs[i];
      if(pict_format->direct.alphaMask > 0) {
        break;
      }
    }

The solution was quite easy. Misleading was the order of the window flags in the documentation which does not match the real bit positions. After checking here the real values


I had the flags
SDL_WINDOW_OPENGL|SDL_WINDOW_FOREIGN|SDL_WINDOW_HIDDEN

Then it was clear. I did just SDL_CreateWindowFrom
But had also to do SDL_ShowWindow afterwards.
Seems that the SDL-dev distributions via apt are different versions between 16.04 and 20.04