subsurface: Add request_move signal
[platform/core/uifw/libds.git] / src / compositor / subsurface.c
index 1e1a672..54e5d8d 100644 (file)
@@ -55,6 +55,7 @@ create_subsurface(struct wl_resource *subcomp_resource,
 
     wl_signal_init(&subsurface->events.destroy);
     wl_signal_init(&subsurface->events.cached);
+    wl_signal_init(&subsurface->events.request_move);
 
     subsurface_link_surface(subsurface, surface);
     subsurface_link_parent(subsurface, parent);
@@ -109,6 +110,8 @@ subsurface_parent_commit(struct ds_subsurface *subsurface, bool synchronized)
             subsurface->current.y != subsurface->pending.y) {
         subsurface->current.x = subsurface->pending.x;
         subsurface->current.y = subsurface->pending.y;
+
+        wl_signal_emit_mutable(&subsurface->events.request_move, subsurface);
     }
 
     if (synchronized || subsurface->synchronized) {