From: Seunghun Lee Date: Tue, 30 May 2023 08:20:16 +0000 (+0900) Subject: subsurface: Add request_move signal X-Git-Tag: accepted/tizen/unified/20230720.164642~26 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=refs%2Fchanges%2F69%2F294269%2F2;p=platform%2Fcore%2Fuifw%2Flibds.git subsurface: Add request_move signal This is to inform an exact timing to move a subsurface. Change-Id: Ib2aaaccbdc6a92bfa7cf7b818cc06a3057414631 --- diff --git a/include/libds/types/ds_subsurface.h b/include/libds/types/ds_subsurface.h index 5fd8346..670daed 100644 --- a/include/libds/types/ds_subsurface.h +++ b/include/libds/types/ds_subsurface.h @@ -23,6 +23,7 @@ struct ds_subsurface struct { struct wl_signal destroy; struct wl_signal cached; + struct wl_signal request_move; } events; struct { diff --git a/src/compositor/subsurface.c b/src/compositor/subsurface.c index 1e1a672..54e5d8d 100644 --- a/src/compositor/subsurface.c +++ b/src/compositor/subsurface.c @@ -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) {