Wayland window transparency

Pekka Paalanen ppaalanen at gmail.com
Tue Mar 11 06:30:33 PDT 2014

On Tue, 11 Mar 2014 14:50:51 +0200
Giulio Camuffo <giuliocamuffo at gmail.com> wrote:

> Hi Neal,
> You don't need to use any Wayland or Weston specific thing. Wayland
> compositor just use buffers you provide to them as you provide them,
> so if you want the buffer to be opaque give Wayland an opaque buffer.
> Either use one without an alpha channel or clear the whole buffer with
> an opaque color before drawing your application content.
> Giulio
> 2014-03-11 14:27 GMT+02:00  <Neal.Kunkle at elektrobit.com>:
> > Hi,
> >
> >
> >
> > I am currently struggling with transparency on a system with Wayland 1.2 and
> > using the Weston compositor.  I have looked through the documentation and
> > read through previous mails, but I did not find an answer to what I seek.
> > Can you please let me know if this is possible/ how to interact with Wayland
> > for the following functionality?
> >
> >
> >
> > What I would like to do:
> >
> > I would like my window to have an opaque background, such that when objects
> > in my application are transparent, I see through them to the window's
> > background.  This is what is occurring on other systems and I would like to
> > remain consistent across platforms.
> >
> >
> >
> > What is currently occurring:
> >
> > When I have transparent objects on my window (meaning low alpha values), I
> > see through the window to whatever is underneath.  If another application is
> > running underneath mine, it will show through transparent places in my
> > window.
> >

Or in other words, it seems like you are just using a wrong blending
mode or algorithm.

On X11 you are probably used to getting an opaque window, no matter
what values you write to the alpha channel. On Wayland, the alpha
channel is actually used by the server to blend your window to the rest
of the desktop, always.

Therefore your problem isn't really about getting transparency, it's
about ensuring that the alpha channel in the final rendered result is
*not* transparent.


More information about the wayland-devel mailing list