[PATCH weston] libweston: Position layers in an absolute way
Quentin Glidic
sardemff7+wayland at sardemff7.net
Tue Jul 5 09:26:52 UTC 2016
On 05/07/2016 11:09, Giulio Camuffo wrote:
> 2016-07-05 10:15 GMT+02:00 Quentin Glidic <sardemff7+wayland at sardemff7.net>:
>> From: Quentin Glidic <sardemff7+git at sardemff7.net>
>>
>> Currently, layers’ order depends on the module loading order.
>> With this patch, modules can safely add their own layer at the correct
>> place.
>>
>> Signed-off-by: Quentin Glidic <sardemff7+git at sardemff7.net>
>> ---
>> desktop-shell/input-panel.c | 9 +++--
>> desktop-shell/shell.c | 80 +++++++++++++++++++++++--------------
>> fullscreen-shell/fullscreen-shell.c | 3 +-
>> ivi-shell/input-panel-ivi.c | 9 +++--
>> ivi-shell/ivi-layout.c | 3 +-
>> ivi-shell/ivi-shell.c | 3 +-
>> libweston/compositor.c | 34 +++++++++++++---
>> libweston/compositor.h | 29 +++++++++++++-
>> tests/weston-test.c | 2 +-
>> 9 files changed, 126 insertions(+), 46 deletions(-)
>>
>> [snip]
>>
>> +/* Higher value means higher in the stack.
>> + * Only one module should use the NORMAL value to make sure clients surfaces
>> + * are stacked properly.
>> + * Other values will stack layers from top to bottom in the order of addition,
>> + * and you should use plugir registry to make surfaces not overlap where
>> + * relevant. */
>> +enum weston_layer_position {
>> + WESTON_LAYER_POSITION_HIDDEN = 0x0000, /* special value to remove
>> + * a layer from the list */
>> + WESTON_LAYER_POSITION_BACKGROUND = 0x0200,
>> + WESTON_LAYER_POSITION_NORMAL = 0x0400,
>> + WESTON_LAYER_POSITION_UI = 0x0600,
>> + WESTON_LAYER_POSITION_FULLSCREEN = 0x0700,
>> + WESTON_LAYER_POSITION_TOP_UI = 0x0800,
>> + WESTON_LAYER_POSITION_LOCK = 0x1000,
>> + WESTON_LAYER_POSITION_CURSOR = 0x1200,
>> + WESTON_LAYER_POSITION_FADE = 0x1201,
>
> In orbital i have 10 layers, so these would not be enough. Besides,
> having to modify libweston everytime i need one more would be a
> hassle. I understand the problem, but i think it is a weston problem,
> rather than libweston, and should be something on top, imho.
>
There is room between these values, specifically so you can add your
own. No need to modify Weston every time. These are just standard values
that plugins can use and developers are aware of, so you can make your
own values meaningful wrt these ones.
These values should be shared between the majority of compositors, so if
you have more to add that are meaningful outside of orbital, please share.
It cannot be a weston problem, IMO, because I really want
libweston-based compositors to share as much modules as possible, and
these modules could add their layers.
Cheers,
>> [snip]
--
Quentin “Sardem FF7” Glidic
More information about the wayland-devel
mailing list