SDL
SDL copied to clipboard
SDL3: SDL_render_gl(render name: opengl) dose not support transparent on Linux/X11
SDL3: SDL_render_gl(render name: opengl) dose not support transparent on Linux/X11:
- Create SDL window with SDL_WINDOW_TRANSPARENT flag;
- Create "opengl" renderer for the window;
- The window can't shown with errors: X Error of failed request: BadMatch (invalid parameter attributes) Major opcode of failed request: 130 (MIT-SHM) Minor opcode of failed request: 3 (X_ShmPutImage)
Bug reason: SDL_x11window.c:490 : bool X11_CreateWindow(SDL_VideoDevice *_this, SDL_Window *window, SDL_PropertiesID create_props) SDL_x11window.c:566 : vinfo = X11_GL_GetVisual(_this, display, screen, transparent);[XVisualInfo *vinfo] the X11_GL_GetVisual function returns a vinfo dose not support transparent.
Fix: SDL_x11opengl.c:637 : XVisualInfo *X11_GL_GetVisual(SDL_VideoDevice *_this, Display *display, int screen, bool transparent) X11_GL_GetVisual should returns a vinfo support transparent when transparent is true.