vially / wayland-explorer

Easily browse and read Wayland protocols documentation
https://wayland.app/protocols/
MIT License
200 stars 24 forks source link

Missing protocol listings compositors report support for? #22

Open JamiKettunen opened 1 year ago

JamiKettunen commented 1 year ago

https://github.com/vially/wayland-explorer/tree/main/protocols (and https://github.com/vially/wayland-explorer/tree/main/src/data/protocols) has some missing protocols as reported by the following command:

for i in $(awk -F'"' '/interface/ {print $4}' src/data/compositors/*.json | sort | uniq); do
    [ $(grep -r src/data/protocols/ -we $i | wc -l) -eq 0 ] && echo $i
done
zwp_input_method_manager_v2
zwp_text_input_manager_v1
zwp_text_input_manager_v2
zxdg_exporter_v1
zxdg_importer_v1
zxdg_shell_v6

Not sure if some of those are false positives. Both Sway and Mir for example report support for e.g. zwp_input_method_manager_v2 (https://gitlab.gnome.org/World/Phosh/phosh/-/blob/main/protocol/input-method-unstable-v2.xml?) but that doesn't appear to be visible on https://wayland.app/protocols/input-method-unstable-v2, but I'm not so sure on the origins of that one.

JamiKettunen commented 1 year ago

@vially Any comment?

vially commented 1 year ago

zwp_input_method_manager_v2

As you've found out, this interface is part of the input-method-unstable-v2 protocol which has not been merged upstream yet. This issue has some more context about state of the various Wayland input protocols.

It looks like this protocol may make its way upstream at some point, but it may be merged under the input_method_v3 name.

zwp_text_input_manager_v1 zwp_text_input_manager_v2

These interfaces are coming from the text-input-unstable-v1 and text-input-unstable-v2 protocols respectively. They have been superseded by text-input-unstable-v3 and that's why they are not listed on the site (see the motivation for this below).

zxdg_exporter_v1 zxdg_importer_v1

These interfaces are coming from the xdg-foreign-unstable-v1 protocol which has been superseded by xdg-foreign-unstable-v2.

zxdg_shell_v6

This interface is coming from the xdg-shell-unstable-v6 protocol which has been superseded by xdg-shell (stable).

Which protocols should and should not be listed on Wayland Explorer

Usually Wayland Explorer only lists protocols which have been merged upstream and are not deprecated [^1].

But this is not a hard-requirement and it may make sense to add some deprecated or in-progress protocols as long as they are marked appropriately in the UI.

The main reason why some deprecated protocols are not listed is to make it less likely for users to land on these protocols from search engines. But I think a better solution would be to display them but mark them as deprecated and make it easy to navigate to their non-deprecated options.

[^1]: External protocols are a bit special and are an exception to this rule.

JamiKettunen commented 1 year ago

But I think a better solution would be to display them but mark them as deprecated and make it easy to navigate to their non-deprecated options.

Yes please ^^ A big red bar or something making it clear they're deprecated, shouldn't be used anymore for new things and linking to the pages for the non-deprecated version would be great. They could be shown at the bottom of https://wayland.app/protocols/

I suppose they can also be periodically dropped (or just hidden) when no compositor reports support for them any longer OR have all moved on to the non-deprecated versions already.

JamiKettunen commented 1 year ago

zwp_input_method_manager_v2

As you've found out, this interface is part of the input-method-unstable-v2 protocol which has not been merged upstream yet. This issue has some more context about state of the various Wayland input protocols.

It looks like this protocol may make its way upstream at some point, but it may be merged under the input_method_v3 name.

Especially with this one there's a bit of a problem: some compositors (current examples being both sway and mir) have "moved on" from zwp_input_method_v1 and no longer support it, while weston only supports v1 (https://wayland.app/protocols/input-method-unstable-v1#compositor-support)

It would be nice to see that there is indeed some form of input method support even if it's a non-merged proposal. Perhaps it can be labelled somehow to make it clear it's not official yet?