}
static void
+surface_map_transient(struct wl_client *client,
+ struct wl_surface *surface, struct wl_surface *parent,
+ int x, int y, uint32_t flags)
+{
+ struct wlsc_surface *es = (struct wlsc_surface *) surface;
+ struct wlsc_surface *pes = (struct wlsc_surface *) parent;
+
+ if (es->mapped)
+ return;
+
+ es->x = pes->x + x;
+ es->y = pes->y + y;
+
+ wlsc_surface_update_matrix(es);
+ wl_list_insert(&es->compositor->surface_list, &es->link);
+ wlsc_compositor_schedule_repaint(es->compositor);
+ es->mapped = 1;
+}
+
+static void
surface_damage(struct wl_client *client,
struct wl_surface *surface,
int32_t x, int32_t y, int32_t width, int32_t height)
surface_destroy,
surface_attach,
surface_map_toplevel,
+ surface_map_transient,
surface_damage
};
<!-- Make the surface visible as a toplevel window. -->
<request name="map_toplevel"/>
+ <!-- Map the surface relative to an existing surface. The x and y
+ arguments specify the locations of the upper left corner of
+ the surface relative to the upper left corner of the parent
+ surface. The flags argument controls overflow/clipping
+ behaviour when the surface would intersect a screen edge,
+ panel or such. And possibly whether the offset only
+ determines the initial position or if the surface is locked
+ to that relative position during moves. -->
+ <request name="map_transient">
+ <arg name="parent" type="object" interface="surface"/>
+ <arg name="x" type="int"/>
+ <arg name="y" type="int"/>
+ <arg name="flags" type="uint"/>
+ </request>
+
<!-- Notify the server that the attached buffer's contents have
changed, and request a redraw. The arguments allow you to
damage only a part of the surface, but the server may ignore