How to make transparent window on linux

后端 未结 3 1912
情话喂你
情话喂你 2021-01-05 02:40

I want to make application an application with a splash screen on Linux.

I want to use X11 and glx (OpenGL application).

I\'ve found a way to remove the bord

3条回答
  •  灰色年华
    2021-01-05 03:17

    In order to have a transparent window under X11, you need

    • an X11 server with composite extension
    • a composite manager
    • an ARGB visual for your window

    You don't need to use OpenGL directly: the composite manager could use it to render the screen.

    If you're going in the GTK path, have a look to

    • gdk_x11_display_composite
    • gdk_screen_is_composited
    • gdk_display_supports_composite
    • gdk_screen_get_rgba_visual
    • gdk_screen_get_rgba_colormap

    But you could also use Qt or another toolkit.

提交回复
热议问题