Number of layers in layer-shell is too limited
the wlr-layer-shell protocol defines two layers above the normal layer for application surfaces: top and overlay. And ordering within a single layer is said to be undefined (although I wonder if that is actually supposed to be "implementation defined"). However, that isn't enough layers for some use cases.
In particular, the documentation states that a fullscreen app is usually par to the "top" layer. This means in order for something to be above a fullscreen app, as may be desirable for notifications and/or a launcher, it must be in the "overlay" layer. However, with a screenshot tool (or something like slurp), an application can end up getting drawn above the screenshot tool (for a concrete example, if I run wldash, then run slurp, wldash is above slurp's semi-transparent window).
This was also previously an issue with screen locking, but I think now that ext-session-lock-v1 is supported, I don't think is an issue any more (since other applications should be hidden).
There are a few ways this could be addressed:
- Have some way to define the order within a single layer, such as one of the following
- Use an integer z-index
- Build more usage of namespaces, perhaps defining some standard ones (see #44), do any compositors currently use namespaces?
- Use the order applications are started in
- Say it is implementation defined, but there is some deterministic ordering
- Add one or more additional layers
- specify that fullscreen is below the top layer, rather than part of it. However, this means you can't have something that is in a layer above normal, but below fullscreen apps.