# Transparent Window Linux

**URL:** https://discourse.glfw.org/t/transparent-window-linux/1797
**Category:** support
**Created:** [March 20, 2021, 7:08am UTC](https://discourse.glfw.org/t/transparent-window-linux/1797 "2021-03-20T07:08:02Z")
**Posts on this page:** 4
**Page:** 1

<div class="post-metadata">

### Author: ![abcdef](https://avatars.discourse-cdn.com/v4/letter/a/2acd7d/32.png) [@abcdef](https://discourse.glfw.org/u/abcdef)
#### Post date: [March 20, 2021, 7:08am UTC](https://discourse.glfw.org/t/transparent-window-linux/1797/1 "2021-03-20T07:08:02Z")

</div>

Hi

Has anyone successfully gotten transparent windows in Linux, specifically Ubuntu (20.04)?

I request the transaparency by setting GLFW\_TRANSPARENT\_FRAMEBUFFER to true but querying after window creation show the value to be 0.

I can force the whole window to be transparent in the OS by running

```auto
xprop -f _NET_WM_WINDOW_OPACITY 32c -set _NET_WM_WINDOW_OPACITY `printf 0x%x $((0xfffffff * 80 / 100))`

```

but I can’t get GLFW to create a transparent window itself

---

<div class="post-metadata">

### Author: ![dougbinks](https://yyz1.discourse-cdn.com/flex035/user_avatar/discourse.glfw.org/dougbinks/32/39_2.png) [@dougbinks](https://discourse.glfw.org/u/dougbinks)
#### Post date: [March 22, 2021, 3:30pm UTC](https://discourse.glfw.org/t/transparent-window-linux/1797/2 "2021-03-22T15:30:01Z")

</div>

I’m not that familiar with the transparency code but I believe the whole window transparency via `_NET_WM_WINDOW_OPACITY` and `GLFW_TRANSPARENT_FRAMEBUFFER` option which controls the use of the framebuffers alpha component to determine the window content transparency are different things.

Documentation for [Window transparency](https://www.glfw.org/docs/3.3/window_guide.html#window_transparency) covers the basics, including [glfwSetWindowOpacity](https://www.glfw.org/docs/3.3/group__window.html#gac31caeb3d1088831b13d2c8a156802e9) which like `_NET_WM_WINDOW_OPACITY` sets the entire Windows transparency.

On X11 I believe `GLFW_TRANSPARENT_FRAMEBUFFER` requires a compositing window manager and support for an alphaMask.

So it is possible your system does not support frame buffer transparency, but does support full window transparency.

---

<div class="post-metadata">

### Author: ![abcdef](https://avatars.discourse-cdn.com/v4/letter/a/2acd7d/32.png) [@abcdef](https://discourse.glfw.org/u/abcdef)
#### Post date: [March 24, 2021, 3:28pm UTC](https://discourse.glfw.org/t/transparent-window-linux/1797/3 "2021-03-24T15:28:03Z")

</div>

Thanks, will look at a compositing window manager

---

<div class="post-metadata">

### Author: ![Papasot](https://yyz1.discourse-cdn.com/flex035/user_avatar/discourse.glfw.org/papasot/32/192_2.png) [@Papasot](https://discourse.glfw.org/u/Papasot)
#### Post date: [March 28, 2021, 6:33pm UTC](https://discourse.glfw.org/t/transparent-window-linux/1797/4 "2021-03-28T18:33:27Z")

</div>

I don’t use Ubuntu, but I don’t think it matters, really. It’s all about the window manager.  
Xfwm (the window manager for the Xfce environment) supports transparency, and GLFW creates transparent windows without any problem. On the other hand, simple stacking window managers such as Openbox will ignore whatever opacity you set with [glfwSetWindowOpacity](https://www.glfw.org/docs/3.3/group__window.html#gac31caeb3d1088831b13d2c8a156802e9). Same for tiling window managers such as Stumpwm.
