damage_view_whole(view);
}
+static void
+handle_request_move(struct wl_listener *listener, void *data)
+{
+ /*
+ * This event is raised when a client would like to begin an interactive
+ * move, typically because the user clicked on their client-side
+ * decorations. Note that a more sophisticated compositor should check
+ * the provied serial against a list of button press serials sent to
+ * this
+ * client, to prevent the client from requesting this whenever they
+ * want.
+ */
+ struct view *view = wl_container_of(listener, view, request_move);
+ interactive_begin(view, LAB_INPUT_STATE_MOVE, 0);
+}
+
static void
handle_map(struct wl_listener *listener, void *data)
{
view->request_fullscreen.notify = handle_request_fullscreen;
wl_signal_add(&xsurface->events.request_fullscreen,
&view->request_fullscreen);
+ view->request_move.notify = handle_request_move;
+ wl_signal_add(&xsurface->events.request_move,
+ &view->request_move);
view->set_title.notify = handle_set_title;
wl_signal_add(&xsurface->events.set_title, &view->set_title);