diff --git a/doc/Wayland/en_US/Protocol.xml b/doc/Wayland/en_US/Protocol.xml index 61dc6372..d92cf6f1 100644 --- a/doc/Wayland/en_US/Protocol.xml +++ b/doc/Wayland/en_US/Protocol.xml @@ -240,6 +240,22 @@ be mapped as 'popup', which combines transient window semantics with a pointer grab. + + To avoid race conditions, input events that are likely to + 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. + + + Input events also carry timestamps with millisecond granularity. + Their base is undefined, so they can't be compared against + system time (as obtained with clock_gettime or gettimeofday). + They can be compared with each other though, and for instance + be used to identify sequences of button presses as double + or triple clicks. + See for the protocol description.