[PATCH] [RFC] desktop-shell: change the alpha of black view in fullscreen mode

Pekka Paalanen ppaalanen at gmail.com
Fri Dec 4 00:14:58 PST 2015


On Thu, 3 Dec 2015 14:18:54 -0800
Bryce Harrington <bryce at osg.samsung.com> wrote:

> On Thu, Dec 03, 2015 at 10:33:27PM +0900, Hyungwon Hwang wrote:
> > This patch changes the alpha value of black view in fullscreen mode,
> > when the applications opacity changes.
> > 
> > Signed-off-by: Hyungwon Hwang <hyungwon.hwang7 at gmail.com>
> > ---
> > This patch is incomplete, and just a proof of concept. But I want to
> > make this patch as the starting point of discussion related the opacity
> > in fullscreen mode [1]. I tested it with weston-fullscreen.  
> 
> Thanks for sending this as an RFC, as a follow up to the earlier
> discussion with pq.  I notice some of the points he had raised in that
> discussion (e.g. avoiding alpha for letterbox edges, etc.) aren't
> being addressed.  In technical terms this patch doesn't look bad but you
> might include a discussion of how the remaining problems would be
> handled?

FWIW, I do think that changing the opacity of the black surface like
this is a totally wrong approach to any problem.

Either the opaque black borders exist or they do not. They are realized
by either a single black surface behind the window like currently, or
several black surfaces around the window. When the black borders must
not be drawn, the black surface(s) must be destroyed (and re-created
on-demand).

If there are obvious bugs with the on-demand realization of the black
surface, like I understood from the comments that there might be,
fixing those would not be controversial.

The real question here is, what use case is there for a fullscreen
window to be semi-transparent?

Should the definition of fullscreen include the assumption of not being
able to see through the window?

The answer to that question must affect shell protocol specification,
or you will get varying implementations between compositors. So, the
proper starting point for that discussion is to look at the shell
protocol specifications.

Also, xdg_shell specification is very different to that of wl_shell
right now. Xdg_shell requires that the window size matches the output
size, which pushes the issue of black borders to the client. So in the
current state of protocol development, questions here apply pretty much
only to wl_shell.

What Weston currently implements wrt. to the black surface may not be
correct for all possible use cases, but I claim that the intention is
correct for the cases where the window size does not match the output
size, as specified in wl_shell spec.

Mind, I will outright refuse all use cases where you use opacity and
input region manipulations to just "switch windows" from client side.


Thanks,
pq

> > 1. Changing the opacity in normal mode.
> > 2. Changing the opacity in fullscreen mode.
> > 3. Changing the opacity in fullscreen mode, but the content is smaller
> > then output.
> > 4. After 1 & 2, switch to another application.
> > 5. After 3, switch to another application.
> > 
> > In case of 1 ~ 4, it works fine. But in case of 5, the opacity does
> > not be kept, and it must be fixed. I think that it is also related another
> > issue I stated in PS below.
> > 
> > I want to discuss about what stance Weston will be on with this issue
> > : When opacity changes in fullscreen mode, which surface's opacity should
> > be affected.
> > 
> > PS. As I made this patch, I found that the opacity resets when the user switch
> > to another application irrespective of fullscreen. It also seemed a little
> > odd to me.
> > 
> > Best regards,
> > Hyungwon Hwang
> > 
> > [1]
> > http://lists.freedesktop.org/archives/wayland-devel/2015-December/025859.html
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 811 bytes
Desc: OpenPGP digital signature
URL: <http://lists.freedesktop.org/archives/wayland-devel/attachments/20151204/60651742/attachment.sig>


More information about the wayland-devel mailing list