From 1aa210fd297fea67543e2c1fbceb6fdbc1ced514 Mon Sep 17 00:00:00 2001 From: Mikhail Gusarov Date: Thu, 13 Jan 2022 17:43:15 +0100 Subject: [PATCH] doc, protocol: Clarify that serial numbers are opaque Specification does not tell anything about behavior of serial numbers, except that their values increase. It is silent about wraparounds, and therefore does not restrict compositors at all: - a compositor that returns constant values may claim that it increases them by 2**32, - a compositor that returns decreasing values may claim that it increases them by 2**32-1, - a compositor that returns random values may claim that it increases them by 2**32+rand32(). Therefore: - drop the useless wording about increasing numbers, - do not specify that wl_display::sync returns the event serial number. This serial number cannot be passed to any request and hence is useless. Signed-off-by: Mikhail Gusarov --- doc/publican/sources/Protocol.xml | 4 ++-- protocol/wayland.xml | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/doc/publican/sources/Protocol.xml b/doc/publican/sources/Protocol.xml index 57d88357..ebfadddd 100644 --- a/doc/publican/sources/Protocol.xml +++ b/doc/publican/sources/Protocol.xml @@ -367,8 +367,8 @@ trigger further requests (such as button presses, key events, pointer motions) carry serial numbers, and requests such as wl_surface.set_popup require that the serial number of the - triggering event is specified. The server maintains a - monotonically increasing counter for these serial numbers. + triggering event is specified. Serial numbers are opaque, + clients should not assign any meaning to them. Input events also carry timestamps with millisecond granularity. diff --git a/protocol/wayland.xml b/protocol/wayland.xml index 10781cf1..b1b2f21d 100644 --- a/protocol/wayland.xml +++ b/protocol/wayland.xml @@ -46,7 +46,7 @@ compositor after the callback is fired and as such the client must not attempt to use it after that point. - The callback_data passed in the callback is the event serial. + The callback_data passed in the callback is not specified.