mirror of
https://gitlab.freedesktop.org/wayland/wayland.git
synced 2025-11-02 09:01:39 -05:00
protocol: introduce wl_shell_surface
Requests like 'move' and 'set_toplevel' are really methods of a surface, not methods of a global shell object. Move all these methods to a new interface, wl_shell_surface. The global object wl_shell will contain only 'get_shell_surface' request, which creates and associates a wl_shell_surface object to a given wl_surface object. This will also give the shell plugin (if you look at the demo compositor) means to store per-surface private data in a natural way. Due to a limitation in delete_id event handling on client side, the client must destroy its wl_shell_surface object before destroying the wl_surface object. Otherwise it may just leak an id. Signed-off-by: Pekka Paalanen <ppaalanen@gmail.com>
This commit is contained in:
parent
e04c137e86
commit
42eed3235a
1 changed files with 15 additions and 11 deletions
|
|
@ -267,8 +267,19 @@
|
||||||
</interface>
|
</interface>
|
||||||
|
|
||||||
<interface name="wl_shell" version="1">
|
<interface name="wl_shell" version="1">
|
||||||
<request name="move">
|
<request name="get_shell_surface">
|
||||||
|
<arg name="id" type="new_id" interface="wl_shell_surface"/>
|
||||||
<arg name="surface" type="object" interface="wl_surface"/>
|
<arg name="surface" type="object" interface="wl_surface"/>
|
||||||
|
</request>
|
||||||
|
</interface>
|
||||||
|
|
||||||
|
<!-- A wrapper interface for shell related actions on a wl_surface.
|
||||||
|
On server side the object is automatically destroyed when the
|
||||||
|
related wl_surface is destroyed.
|
||||||
|
On client side, wl_shell_surface_destroy() must be called
|
||||||
|
before destroying the wl_surface object. -->
|
||||||
|
<interface name="wl_shell_surface" version="1">
|
||||||
|
<request name="move">
|
||||||
<arg name="input_device" type="object" interface="wl_input_device"/>
|
<arg name="input_device" type="object" interface="wl_input_device"/>
|
||||||
<arg name="time" type="uint"/>
|
<arg name="time" type="uint"/>
|
||||||
</request>
|
</request>
|
||||||
|
|
@ -286,7 +297,6 @@
|
||||||
</enum>
|
</enum>
|
||||||
|
|
||||||
<request name="resize">
|
<request name="resize">
|
||||||
<arg name="surface" type="object" interface="wl_surface"/>
|
|
||||||
<arg name="input_device" type="object" interface="wl_input_device"/>
|
<arg name="input_device" type="object" interface="wl_input_device"/>
|
||||||
<arg name="time" type="uint"/>
|
<arg name="time" type="uint"/>
|
||||||
<!-- edges is an enum, need to get the values in here -->
|
<!-- edges is an enum, need to get the values in here -->
|
||||||
|
|
@ -294,9 +304,7 @@
|
||||||
</request>
|
</request>
|
||||||
|
|
||||||
<!-- Make the surface visible as a toplevel window. -->
|
<!-- Make the surface visible as a toplevel window. -->
|
||||||
<request name="set_toplevel">
|
<request name="set_toplevel"/>
|
||||||
<arg name="surface" type="object" interface="wl_surface"/>
|
|
||||||
</request>
|
|
||||||
|
|
||||||
<!-- Map the surface relative to an existing surface. The x and y
|
<!-- Map the surface relative to an existing surface. The x and y
|
||||||
arguments specify the locations of the upper left corner of
|
arguments specify the locations of the upper left corner of
|
||||||
|
|
@ -307,8 +315,7 @@
|
||||||
determines the initial position or if the surface is locked
|
determines the initial position or if the surface is locked
|
||||||
to that relative position during moves. -->
|
to that relative position during moves. -->
|
||||||
<request name="set_transient">
|
<request name="set_transient">
|
||||||
<arg name="surface" type="object" interface="wl_surface"/>
|
<arg name="parent" type="object" interface="wl_shell_surface"/>
|
||||||
<arg name="parent" type="object" interface="wl_surface"/>
|
|
||||||
<arg name="x" type="int"/>
|
<arg name="x" type="int"/>
|
||||||
<arg name="y" type="int"/>
|
<arg name="y" type="int"/>
|
||||||
<arg name="flags" type="uint"/>
|
<arg name="flags" type="uint"/>
|
||||||
|
|
@ -322,9 +329,7 @@
|
||||||
fullscreen? what if there's already a fullscreen surface on
|
fullscreen? what if there's already a fullscreen surface on
|
||||||
the output, maybe you can only go fullscreen if you're
|
the output, maybe you can only go fullscreen if you're
|
||||||
active? -->
|
active? -->
|
||||||
<request name="set_fullscreen">
|
<request name="set_fullscreen"/>
|
||||||
<arg name="surface" type="object" interface="wl_surface"/>
|
|
||||||
</request>
|
|
||||||
|
|
||||||
<!-- The configure event asks the client to resize its surface.
|
<!-- The configure event asks the client to resize its surface.
|
||||||
The size is a hint, in the sense that the client is free to
|
The size is a hint, in the sense that the client is free to
|
||||||
|
|
@ -335,7 +340,6 @@
|
||||||
<event name="configure">
|
<event name="configure">
|
||||||
<arg name="time" type="uint"/>
|
<arg name="time" type="uint"/>
|
||||||
<arg name="edges" type="uint"/>
|
<arg name="edges" type="uint"/>
|
||||||
<arg name="surface" type="object" interface="wl_surface"/>
|
|
||||||
<arg name="width" type="int"/>
|
<arg name="width" type="int"/>
|
||||||
<arg name="height" type="int"/>
|
<arg name="height" type="int"/>
|
||||||
</event>
|
</event>
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue