From 5b77199cc1ad9d971d9ef51c9f21ef6149942193 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Jonas=20=C3=85dahl?= Date: Tue, 5 May 2015 15:35:15 +0800 Subject: [PATCH] xdg-shell: Document error conditions when popup and surface getters MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Document that a wl_surface can only be assigned either a xdg_popup or xdg_surface once and that if the client still stries to do that an error is raised. Signed-off-by: Jonas Ã…dahl Reviewed-by: Bryce Harrington Pekka Paalanen --- protocol/xdg-shell.xml | 16 ++++++++++++++-- 1 file changed, 14 insertions(+), 2 deletions(-) diff --git a/protocol/xdg-shell.xml b/protocol/xdg-shell.xml index 07206627..06a6cfd6 100644 --- a/protocol/xdg-shell.xml +++ b/protocol/xdg-shell.xml @@ -78,7 +78,13 @@ This creates an xdg_surface for the given surface and gives it the - xdg_surface role. See the documentation of xdg_surface for more details. + xdg_surface role. A wl_surface can only be given an xdg_surface role + once. If get_xdg_surface is called with a wl_surface that already has + an active xdg_surface associated with it, or if it had any other role, + an error is raised. + + See the documentation of xdg_surface for more details about what an + xdg_surface is and how it is used. @@ -87,10 +93,16 @@ This creates an xdg_popup for the given surface and gives it the - xdg_popup role. See the documentation of xdg_popup for more details. + xdg_popup role. A wl_surface can only be given an xdg_popup role + once. If get_xdg_popup is called with a wl_surface that already has + an active xdg_popup associated with it, or if it had any other role, + an error is raised. This request must be used in response to some sort of user action like a button press, key press, or touch down event. + + See the documentation of xdg_popup for more details about what an + xdg_popup is and how it is used.