compositor: Move emitting destroy signal on destruction of E_Surface 63/319163/1
authorSeunghun Lee <shiin.lee@samsung.com>
Fri, 24 Jan 2025 01:46:12 +0000 (10:46 +0900)
committerSeunghun Lee <shiin.lee@samsung.com>
Wed, 5 Feb 2025 01:00:14 +0000 (10:00 +0900)
Instead of emitting destroy signal on destruction of ds_surface, it
makes E_Surface emit it on its destruction.

Change-Id: I021c686a4212229ac472b5fa3e049268c27a919a

src/bin/server/e_compositor.c

index cb45bc24679813860327db84f86b01cd7aee9929..b38f697c08dd18c0180b33594c1dc9d7a4a95c33 100644 (file)
@@ -1021,6 +1021,8 @@ _e_surface_destroy(E_Surface *surface)
 
    ELOGF("COMPOSITOR", "Desroy E_Surface %p", surface->ec, surface);
 
+   wl_signal_emit(&surface->events.destroy, surface);
+
    g_mutex_lock(&surface->base.surface_mutex);
 
    wl_signal_emit(&surface->base.destroy_signal, &surface->base.surface);
@@ -1389,8 +1391,6 @@ _e_surface_cb_destroy(struct wl_listener *listener, void *data)
 
    surface = wl_container_of(listener, surface, destroy);
 
-   wl_signal_emit(&surface->events.destroy, surface);
-
    wl_list_remove(&surface->destroy.link);
    wl_list_remove(&surface->precommit_to_cache.link);
    wl_list_remove(&surface->precommit_from_cache.link);