summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorPekka Paalanen <ppaalanen@gmail.com>2011-11-24 16:19:03 +0200
committerPekka Paalanen <ppaalanen@gmail.com>2011-11-29 14:46:49 +0200
commit42eed3235a8349ac2139bb9a06cb8ac294872809 (patch)
tree64b3ff67c36dadc97d522f32e4bb10af8eac9ef1
parente04c137e86f3672f5274a3168a3e88483a191693 (diff)
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>
-rw-r--r--protocol/wayland.xml26
1 files changed, 15 insertions, 11 deletions
diff --git a/protocol/wayland.xml b/protocol/wayland.xml
index 51a83ef..b80f25e 100644
--- a/protocol/wayland.xml
+++ b/protocol/wayland.xml
@@ -267,8 +267,19 @@
</interface>
<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"/>
+ </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="time" type="uint"/>
</request>
@@ -286,7 +297,6 @@
</enum>
<request name="resize">
- <arg name="surface" type="object" interface="wl_surface"/>
<arg name="input_device" type="object" interface="wl_input_device"/>
<arg name="time" type="uint"/>
<!-- edges is an enum, need to get the values in here -->
@@ -294,9 +304,7 @@
</request>
<!-- Make the surface visible as a toplevel window. -->
- <request name="set_toplevel">
- <arg name="surface" type="object" interface="wl_surface"/>
- </request>
+ <request name="set_toplevel"/>
<!-- Map the surface relative to an existing surface. The x and y
arguments specify the locations of the upper left corner of
@@ -307,8 +315,7 @@
determines the initial position or if the surface is locked
to that relative position during moves. -->
<request name="set_transient">
- <arg name="surface" type="object" interface="wl_surface"/>
- <arg name="parent" type="object" interface="wl_surface"/>
+ <arg name="parent" type="object" interface="wl_shell_surface"/>
<arg name="x" type="int"/>
<arg name="y" type="int"/>
<arg name="flags" type="uint"/>
@@ -322,9 +329,7 @@
fullscreen? what if there's already a fullscreen surface on
the output, maybe you can only go fullscreen if you're
active? -->
- <request name="set_fullscreen">
- <arg name="surface" type="object" interface="wl_surface"/>
- </request>
+ <request name="set_fullscreen"/>
<!-- The configure event asks the client to resize its surface.
The size is a hint, in the sense that the client is free to
@@ -335,7 +340,6 @@
<event name="configure">
<arg name="time" type="uint"/>
<arg name="edges" type="uint"/>
- <arg name="surface" type="object" interface="wl_surface"/>
<arg name="width" type="int"/>
<arg name="height" type="int"/>
</event>