mirror of
https://gitlab.freedesktop.org/wayland/wayland-protocols.git
synced 2026-05-08 03:08:04 +02:00
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 <ahiemstra@heimr.nl>
This commit is contained in:
parent
2398378cf7
commit
76e35f08da
1 changed files with 53 additions and 2 deletions
|
|
@ -266,7 +266,7 @@
|
|||
</event>
|
||||
</interface>
|
||||
|
||||
<interface name="zwp_input_panel_v1" version="1">
|
||||
<interface name="zwp_input_panel_v1" version="2">
|
||||
<description summary="interface for implementing keyboards">
|
||||
Only one client can bind this interface at a time.
|
||||
</description>
|
||||
|
|
@ -277,7 +277,7 @@
|
|||
</request>
|
||||
</interface>
|
||||
|
||||
<interface name="zwp_input_panel_surface_v1" version="1">
|
||||
<interface name="zwp_input_panel_surface_v1" version="2">
|
||||
<enum name="position">
|
||||
<entry name="center_bottom" value="0"/>
|
||||
</enum>
|
||||
|
|
@ -300,6 +300,57 @@
|
|||
a text input is active.
|
||||
</description>
|
||||
</request>
|
||||
|
||||
<event name="configure" since="2">
|
||||
<description summary="suggest a surface change">
|
||||
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.
|
||||
</description>
|
||||
<arg name="serial" type="uint"/>
|
||||
<arg name="width" type="uint"/>
|
||||
<arg name="height" type="uint"/>
|
||||
</event>
|
||||
|
||||
<request name="ack_configure" since="2">
|
||||
<description summary="ack a configure event">
|
||||
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.
|
||||
</description>
|
||||
<arg name="serial" type="uint" summary="the serial from the configure event"/>
|
||||
</request>
|
||||
|
||||
<enum name="error">
|
||||
<entry name="invalid_surface_state" value="0" summary="provided surface state is invalid"/>
|
||||
</enum>
|
||||
</interface>
|
||||
|
||||
</protocol>
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue