From 31024f299a08b59a2887893bfa490b74b91b935d Mon Sep 17 00:00:00 2001 From: Vlad Zahorodnii Date: Mon, 30 Dec 2024 04:12:56 +0200 Subject: [PATCH] xdg-shell: Clarify xdg_surface.ack_configure behavior The current wording is open to interpretation. The updated version clarifies that the client is not required to commit the surface immediately after receiving a configure event (for example it can wait N milliseconds, paint and commit the surface) but it must still do it within a reasonable timeframe. The main motivation behind this behavior is that some Wayland compositors use configure events to synchronize the server side double buffered state with the client side state. If the client decides that the received configure event can be postponed indefinetely, this can leave the compositor with outdated current state, e.g. wrong position, and so on. Signed-off-by: Vlad Zahorodnii --- stable/xdg-shell/xdg-shell.xml | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/stable/xdg-shell/xdg-shell.xml b/stable/xdg-shell/xdg-shell.xml index 1caf6f1..0be849d 100644 --- a/stable/xdg-shell/xdg-shell.xml +++ b/stable/xdg-shell/xdg-shell.xml @@ -571,10 +571,6 @@ Acking a configure event that was never sent raises an invalid_serial error. - A client is not required to commit immediately after sending - an ack_configure request - it may even ack_configure several times - before its next surface commit. - A client may send multiple ack_configure requests before committing, but only the last request sent before a commit indicates which configure event the client really is responding to. @@ -609,6 +605,10 @@ an ack_configure request with the serial sent in this configure event at some point before committing the new surface. + The client must send an ack_configure request and commit the surface + within a reasonable amount of time. The surface must be committed even if + there are no visible changes in response to the configure event. + If the client receives multiple configure events before it can respond to one, it is free to discard all but the last event it received.