From 76e35f08da023b9cc7043b1c091685ef8ade9f43 Mon Sep 17 00:00:00 2001 From: Arjen Hiemstra Date: Mon, 25 Apr 2022 15:20:00 +0200 Subject: [PATCH] Add a configure event to zwp_input_panel_v1 When displaying an input panel, the compositor may sometimes want to adjust the placement and size of the input panel, for example to account for a task bar or other shell surface that the input panel may overlap. While placement is already done by the compositor, currently there is no way to communicate a desired size to the input panel client, so sizing is not possible. This adds a configure event to `zwp_input_panel_v1`, allowing the compositor to request a new panel size from the input panel client. A corresdponding ack_configure request is also added so the client can let the compositor know it processed the configure. Signed-off-by: Arjen Hiemstra --- .../input-method/input-method-unstable-v1.xml | 55 ++++++++++++++++++- 1 file changed, 53 insertions(+), 2 deletions(-) diff --git a/unstable/input-method/input-method-unstable-v1.xml b/unstable/input-method/input-method-unstable-v1.xml index e9d93ba..df940e8 100644 --- a/unstable/input-method/input-method-unstable-v1.xml +++ b/unstable/input-method/input-method-unstable-v1.xml @@ -266,7 +266,7 @@ - + Only one client can bind this interface at a time. @@ -277,7 +277,7 @@ - + @@ -300,6 +300,57 @@ a text input is active. + + + + The configure event asks the client to resize its surface. + + Clients should arrange their surface for the new states, and then send + an ack_configure request with the serial sent in this configure event at + some point before committing the new surface. + + The client is free to dismiss all but the last configure event it + received. + + The width and height arguments specify the size of the window in + surface-local coordinates. + + The size is a hint, in the sense that the client is free to ignore it if + it doesn't resize, pick a smaller size (to satisfy aspect ratio or + resize in steps of NxM pixels). + + If the width or height arguments are zero, it means the client should + decide its own window dimension. + + + + + + + + + When a configure event is received, if a client commits the + surface in response to the configure event, then the client + must make an ack_configure request sometime before the commit + request, passing along the serial of the configure event. + + If the client receives multiple configure events before it + can respond to one, it only has to ack the last configure event. + + 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. + + + + + + +