mirror of
https://gitlab.freedesktop.org/wayland/wayland-protocols.git
synced 2025-12-28 09:50:10 +01:00
Merge branch 'jorth/popup-move' into 'main'
xdg-shell: add popup move/resize requests See merge request wayland/wayland-protocols!473
This commit is contained in:
commit
e77bf4d22f
1 changed files with 75 additions and 5 deletions
|
|
@ -29,7 +29,7 @@
|
|||
DEALINGS IN THE SOFTWARE.
|
||||
</copyright>
|
||||
|
||||
<interface name="xdg_wm_base" version="7">
|
||||
<interface name="xdg_wm_base" version="8">
|
||||
<description summary="create desktop-style surfaces">
|
||||
The xdg_wm_base interface is exposed as a global object enabling clients
|
||||
to turn their wl_surfaces into windows in a desktop environment. It
|
||||
|
|
@ -122,7 +122,7 @@
|
|||
</event>
|
||||
</interface>
|
||||
|
||||
<interface name="xdg_positioner" version="7">
|
||||
<interface name="xdg_positioner" version="8">
|
||||
<description summary="child surface positioner">
|
||||
The xdg_positioner provides a collection of rules for the placement of a
|
||||
child surface relative to a parent surface. Rules can be defined to ensure
|
||||
|
|
@ -407,7 +407,7 @@
|
|||
</request>
|
||||
</interface>
|
||||
|
||||
<interface name="xdg_surface" version="7">
|
||||
<interface name="xdg_surface" version="8">
|
||||
<description summary="desktop user interface surface base interface">
|
||||
An interface that may be implemented by a wl_surface, for
|
||||
implementations that provide a desktop-style user interface.
|
||||
|
|
@ -620,7 +620,7 @@
|
|||
|
||||
</interface>
|
||||
|
||||
<interface name="xdg_toplevel" version="7">
|
||||
<interface name="xdg_toplevel" version="8">
|
||||
<description summary="toplevel surface">
|
||||
This interface defines an xdg_surface role which allows a surface to,
|
||||
among other things, set window-like properties such as maximize,
|
||||
|
|
@ -1242,7 +1242,7 @@
|
|||
</event>
|
||||
</interface>
|
||||
|
||||
<interface name="xdg_popup" version="7">
|
||||
<interface name="xdg_popup" version="8">
|
||||
<description summary="short-lived, popup surfaces for menus">
|
||||
A popup surface is a short-lived, temporary surface. It can be used to
|
||||
implement for example menus, popovers, tooltips and other similar user
|
||||
|
|
@ -1273,6 +1273,8 @@
|
|||
<enum name="error">
|
||||
<entry name="invalid_grab" value="0"
|
||||
summary="tried to grab after being mapped"/>
|
||||
<entry name="invalid_resize_edge" value="1"
|
||||
summary="provided value is not a valid variant of the resize_edge enum"/>
|
||||
</enum>
|
||||
|
||||
<request name="destroy" type="destructor">
|
||||
|
|
@ -1344,6 +1346,8 @@
|
|||
ever sent once for the initial configuration. Starting with version 3,
|
||||
it may be sent again if the popup is setup with an xdg_positioner with
|
||||
set_reactive requested, or in response to xdg_popup.reposition requests.
|
||||
|
||||
Starting with version 8, this event may be sent at any time.
|
||||
</description>
|
||||
<arg name="x" type="int"
|
||||
summary="x position relative to parent surface window geometry"/>
|
||||
|
|
@ -1388,6 +1392,9 @@
|
|||
If the popup is repositioned together with a parent that is being
|
||||
resized, but not in response to a configure event, the client should
|
||||
send an xdg_positioner.set_parent_size request.
|
||||
|
||||
Since version 8, this request will cancel any interactive move or resize
|
||||
operation.
|
||||
</description>
|
||||
<arg name="positioner" type="object" interface="xdg_positioner"/>
|
||||
<arg name="token" type="uint" summary="reposition request token"/>
|
||||
|
|
@ -1414,5 +1421,68 @@
|
|||
<arg name="token" type="uint" summary="reposition request token"/>
|
||||
</event>
|
||||
|
||||
<!-- version 8 additions -->
|
||||
|
||||
<request name="move" since="8">
|
||||
<description summary="start an interactive move">
|
||||
Start an interactive, user-driven move of the surface.
|
||||
|
||||
This request must be used in response to some sort of user action
|
||||
like a button press, key press, or touch down event. The passed
|
||||
serial is used to determine the type of interactive move (touch,
|
||||
pointer, etc).
|
||||
|
||||
The server may ignore move requests. For example, if the passed serial
|
||||
is no longer valid.
|
||||
|
||||
If triggered, the surface will lose the focus of the device
|
||||
(wl_pointer, wl_touch, etc) used for the move. It is up to the
|
||||
compositor to visually indicate that the move is taking place, such as
|
||||
updating a pointer cursor, during the move. There is no guarantee
|
||||
that the device focus will return when the move is completed.
|
||||
</description>
|
||||
<arg name="seat" type="object" interface="wl_seat"
|
||||
summary="the wl_seat of the user event"/>
|
||||
<arg name="serial" type="uint" summary="the serial of the user event"/>
|
||||
</request>
|
||||
|
||||
<request name="resize" since="8">
|
||||
<description summary="start an interactive resize">
|
||||
Start a user-driven, interactive resize of the surface.
|
||||
|
||||
This request must be used in response to some sort of user action
|
||||
like a button press, key press, or touch down event. The passed
|
||||
serial is used to determine the type of interactive resize (touch,
|
||||
pointer, etc).
|
||||
|
||||
The server may ignore resize requests. For example, if the passed serial
|
||||
is no longer valid.
|
||||
|
||||
If triggered, the client will receive configure events with the
|
||||
expected sizes. The client must also acknowledge configure events using
|
||||
"ack_configure".
|
||||
|
||||
If triggered, the surface also will lose the focus of the device
|
||||
(wl_pointer, wl_touch, etc) used for the resize. It is up to the
|
||||
compositor to visually indicate that the resize is taking place,
|
||||
such as updating a pointer cursor, during the resize. There is no
|
||||
guarantee that the device focus will return when the resize is
|
||||
completed.
|
||||
|
||||
The edges parameter specifies how the surface should be resized, and
|
||||
is one of the values of the resize_edge enum. Values not matching
|
||||
a variant of the enum will cause the invalid_resize_edge protocol error.
|
||||
The compositor may use this information to update the surface position
|
||||
for example when dragging the top left corner. The compositor may also
|
||||
use this information to adapt its behavior, e.g. choose an appropriate
|
||||
cursor image.
|
||||
</description>
|
||||
<arg name="seat" type="object" interface="wl_seat"
|
||||
summary="the wl_seat of the user event"/>
|
||||
<arg name="serial" type="uint" summary="the serial of the user event"/>
|
||||
<arg name="edges" type="uint" enum="xdg_toplevel.resize_edge"
|
||||
summary="which edge or corner is being dragged"/>
|
||||
</request>
|
||||
|
||||
</interface>
|
||||
</protocol>
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue