[PATCH wayland] protocol: Add deprecation note about wl_shell
Nils Chr. Brause
nilschrbrause at gmail.com
Mon Dec 4 09:18:21 UTC 2017
Hi!
On 4 December 2017 at 09:16, Pekka Paalanen <ppaalanen at gmail.com> wrote:
> On Sat, 2 Dec 2017 10:57:45 +0800
> Jonas Ådahl <jadahl at gmail.com> wrote:
>
>> Now that xdg_shell is stable and much better defined than wl_shell we
>> can finally deprecate wl_shell and guide users towards xdg_shell
>> instead.
>>
>> Signed-off-by: Jonas Ådahl <jadahl at gmail.com>
>> ---
>
> Hi,
>
> Acked-by: Pekka Paalanen <pekka.paalanen at collabora.co.uk>
>
>>
>> Eventually we can consider adding deprecation attributes the
>> <interface> XML nodes that'll turn into compiler warnings, but this is
>> at least a start moving away from wl_shell. I imagine the wl_shell users
>> today (SDL, GLFW at least) to hopefully migrate soon, but keep the
>> wl_shell as a fallback for the time being while compositors add support
>> for xdg_shell. So we probably don't want to add compiler warnings for
>> them just yet.
I really like the idea of a deprecation attribute. The C++ bindings
would use it to add the [[deprecated("reason")]] attribute specifier
sequences to interface classes, event callbacks and request methods.
The value of the XML attribute could be what to use instead, e.g:
<interface name="wl_shell" version="1" deprecated="xdg_wm_base">
This value could be used in the C++ bindings as the "reason" argument.
>
> I would imagine compositors wanting to keep the support for a long
> time, so maybe the warnings would be just in the client header?
Yes, of course, this would be client only.
>
> OTOH, ISTR problems with having deprecation warnings in
> system-installed headers, compilers ignoring them...
I don't know about gcc, but g++ certainly doesn't ignore the
[[deprecated]] attribute on headers in /usr/include. I just tested
this with g++ 7.2.
>
>
> Thanks,
> pq
Cheers,
Nils
>
>
>> protocol/wayland.xml | 3 +++
>> 1 file changed, 3 insertions(+)
>>
>> diff --git a/protocol/wayland.xml b/protocol/wayland.xml
>> index aabc7ae..77d991e 100644
>> --- a/protocol/wayland.xml
>> +++ b/protocol/wayland.xml
>> @@ -976,6 +976,9 @@
>>
>> It allows clients to associate a wl_shell_surface with
>> a basic surface.
>> +
>> + Note! This protocol is deprecated and not intended for production use.
>> + For desktop-style user interfaces, use xdg_shell.
>> </description>
>>
>> <enum name="error">
>
>
> _______________________________________________
> wayland-devel mailing list
> wayland-devel at lists.freedesktop.org
> https://lists.freedesktop.org/mailman/listinfo/wayland-devel
>
More information about the wayland-devel
mailing list