Custom Wayland Protocol Extensions

Supporting protocol extensions is an important part of every Wayland compositor. Mir supports, and will continue to support some protocol extensions out of the box (for example, XDG shell, which is used by almost every Wayland compositor).

There are cases where Mir shells need an extension not yet supported by Mir. There are a number of reasons this might be the case:

  • A new extension is desired which is not (yet) implement by Mir
  • A shell wants to implement custom Wayland interactions; for example, talking to out-of-process shell components

There are a number of ways how this could be dealt with:

  • Add the extension to Mir, and submit a pull request
    • This is great for extensions many shells would like to use
    • As a part of Mir, the code would be maintained by the core Mir developers
    • Compositors that don’t want to use the extension could simply leave it turned off
    • Getting the code reviewed and released takes effort and time
  • Soft fork Mir and add the extension
    • Not ideal, as maintaining soft forks can be annoying
    • May be temporarily necessary while waiting for patches to be merged and released upstream
    • May also be needed if protocol is specific to a single shell or use case
    • Can not be easily used by other shells
  • Use a (hypothetical) Miral API to implement a custom extension
    • Faster and easier for shell developers; does not require recompiling Mir
    • May have limited functionality: A simple API would not allow for protocols that depend on other Wayland objects.
    • Can not be easily used by other shells