Skip to content

Draft: staging: Add xdg-occlusion protocol

Guido Günther requested to merge agx/wayland-protocols:occlusion into main

I tried to wrap #87 in a protocol description.

This protocol allows compositors to send information on occluded display areas to clients. This way compositors can describe display notches, waterfalls and low resolution areas to clients so that these can avoid placing important information there.

As the information is relevant to fullscreen and maximized toplevels only I've put it in the xdg namespace.

I opted for two types:

1. Box

A rectangular box which can be used to describe

  • the bounding box (or a better approximation as as describe here of one or more notches
  • waterfalls (with the possibility to specify a reduced resolution)
  • lower resolution areas covering a under display camera
  • rounded corners for compositors that want to mark them as "keep out areas"

The client can easily figure out if the box is attached to the surface edge so we don't transport that via the protocol.

2. Corner

Each corner can be at either surface edge and has a radius (thus assuming circular edges), more complex forms would either be described by multiple boxes or approximated by that single radius (the later is what e.g. Android does). We allow to specify all four edges individually as e.g. the surface might not be attached to all four screen edges.

Alternatives

An alternative not yet in the protocol could be to send a list of occluded areas plus "unoccluded" areas that are "cut out" of the occluded ones. That would allow to specify waterfalls on all four screen edges (assuming the surface is fullscreen) by one occlusion box spanning the whole surface and a "unoccluded" box that is slightly smaller covering the normal resolution screen area. That method could also be used to approximate corners however I think just dealing with occlusion is easier to deal with for client implementations (and we could also add it in a later protocol revision)

Closes: #87

Signed-off-by: Guido Günther agx@sigxcpu.org

Edited by Guido Günther

Merge request reports

Loading