Wayland window transparency

Neal.Kunkle at elektrobit.com Neal.Kunkle at elektrobit.com
Tue Mar 11 08:19:49 PDT 2014


Ok, this makes sense now.  I am indeed used to always getting an opaque window.  

Thank you for your responses!
Neal Kunkle

-----Original Message-----
From: Pekka Paalanen [mailto:ppaalanen at gmail.com] 
Sent: Tuesday, March 11, 2014 2:31 PM
To: Kunkle Neal
Cc: Giulio Camuffo; wayland mailing list
Subject: Re: Wayland window transparency

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.


Thanks,
pq


----------------------------------------------------------------
Please note: This e-mail may contain confidential information
intended solely for the addressee. If you have received this
e-mail in error, please do not disclose it to anyone, notify
the sender promptly, and delete the message from your system.
Thank you.



More information about the wayland-devel mailing list