From 25837401d554402fdc064007f2c44a8589e0612d Mon Sep 17 00:00:00 2001 From: Nicolas Fella Date: Sun, 1 Mar 2026 13:44:38 +0100 Subject: [PATCH] dbus_annotation: New protocol The protocol allows surfaces to be associated with DBus objects and interfaces. There's several use cases for this: - associating surfaces with (AT-SPI) accessibility trees - associating surfaces with DBus-exported menus The protocol is designed in such a way that it allows apps/compositors to use it for additional tasks without spec changes, allowing to replace custom protocols currently in use for this task. Signed-off-by: Nicolas Fella --- meson.build | 1 + staging/xdg-dbus-annotation/README | 4 + .../xdg-dbus-annotation-v1.xml | 127 ++++++++++++++++++ 3 files changed, 132 insertions(+) create mode 100644 staging/xdg-dbus-annotation/README create mode 100644 staging/xdg-dbus-annotation/xdg-dbus-annotation-v1.xml diff --git a/meson.build b/meson.build index 4eda373..0ce05da 100644 --- a/meson.build +++ b/meson.build @@ -74,6 +74,7 @@ staging_protocols = { 'single-pixel-buffer': {'v1': []}, 'tearing-control': {'v1': []}, 'xdg-activation': {'v1': []}, + 'xdg-dbus-annotation': {'v1': []}, 'xdg-dialog': {'v1': ['stable/xdg-shell/xdg-shell.xml']}, 'xdg-session-management': {'v1': ['stable/xdg-shell/xdg-shell.xml']}, 'xdg-system-bell': {'v1': []}, diff --git a/staging/xdg-dbus-annotation/README b/staging/xdg-dbus-annotation/README new file mode 100644 index 0000000..448535c --- /dev/null +++ b/staging/xdg-dbus-annotation/README @@ -0,0 +1,4 @@ +DBus annotation protocol + +Maintainers: +Nicolas Fella diff --git a/staging/xdg-dbus-annotation/xdg-dbus-annotation-v1.xml b/staging/xdg-dbus-annotation/xdg-dbus-annotation-v1.xml new file mode 100644 index 0000000..a90faf8 --- /dev/null +++ b/staging/xdg-dbus-annotation/xdg-dbus-annotation-v1.xml @@ -0,0 +1,127 @@ + + + + + + The dbus_annotation_manager allows a client to annotate surfaces with information + about associated DBus objects. + + Clients should request the creation of an dbus_annotation object when they create a relevant + D-Bus object, and should release the annotation when they destroy a D-Bus object associated + with their wl_surface. + + Each surface can only have one annotation with a given interface name. + The already_annotated protocol error will be raised if the client requests more than + one dbus_annotation object with a given interface name for a surface. + + + + + An object that provides access to the creation of dbus_annotation objects. + + + + + Destroy the xdg_dbus_annotation_manager object. xdg_dbus_annotation objects created from this + object remain valid and should be destroyed separately. + + + + + + Creates an annotation associated with a given wl_surface. + + + + The interface other D-Bus clients can expect the object specified by the + annotation to implement. + + + + + + The surface to associate the annotation with. + + + + + + + + + + + + An object that provides access to clients to notify the compositor of + associated D-Bus objects for a wl_surface. + + This state is double-buffered, see wl_surface.commit. + + If not applicable, clients should remove this object. + + + + + + + + + + + + + + + Set or update the bus corresponding to the + D-Bus object. + + + + + + + Set or update the pending bus name corresponding to the + D-Bus object. + + Strings should be formatted according to the relevant D-Bus specifications. + + + + + + + Set or update the pending object path corresponding to the + D-Bus object. + + Strings should be formatted according to the relevant D-Bus specifications. + + + + +