From: TaeHyeon Jeong Date: Wed, 4 Sep 2024 09:24:19 +0000 (+0900) Subject: hwc: Modify ds_tizen_hwc destruction logic X-Git-Tag: accepted/tizen/unified/20240924.153216^0 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=refs%2Fheads%2Ftizen_9.0;p=platform%2Fcore%2Fuifw%2Flibds-tizen.git hwc: Modify ds_tizen_hwc destruction logic AS-IS - when hwc is destroyed, client is not destroyed together TO-BE - client is also destroyed with hwc Change-Id: I3706afeacc3388350391531188786cae3127eb3f --- diff --git a/src/hwc/hwc.c b/src/hwc/hwc.c index 837798a..d618daf 100644 --- a/src/hwc/hwc.c +++ b/src/hwc/hwc.c @@ -208,14 +208,21 @@ static void hwc_handle_display_destroy(struct wl_listener *listener, void *data) { struct ds_tizen_hwc *hwc; + struct ds_tizen_hwc_client *client, *tmp; hwc = wl_container_of(listener, hwc, destroy); ds_inf("Global destroy: hwc(%p)", hwc); - wl_signal_emit(&hwc->events.destroy, hwc); wl_list_remove(&hwc->destroy.link); + + wl_list_for_each_safe(client, tmp, &hwc->clients, link) + wl_resource_destroy(client->resource); + wl_global_destroy(hwc->global); + + wl_signal_emit(&hwc->events.destroy, hwc); + free(hwc); }